Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion stl/inc/execution
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,6 @@ _Common_diff_t<_InIt1, _InIt2> _Distance_min(_InIt1 _First1, const _InIt1 _Last1
return _Result;
}


// PARALLEL FUNCTION TEMPLATE all_of
template <bool _Invert, class _FwdIt, class _Pr>
struct _Static_partitioned_all_of_family2 { // all_of/any_of/none_of task scheduled on the system thread pool
Expand All @@ -1066,6 +1065,8 @@ struct _Static_partitioned_all_of_family2 { // all_of/any_of/none_of task schedu
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.
// GH-818: https://github.com/microsoft/STL/issues/818

const auto _Range = _Basis._Get_chunk(_Key);
for (auto _First = _Range._First; _First != _Range._Last; ++_First) {
Expand Down Expand Up @@ -1295,6 +1296,7 @@ struct _Static_partitioned_find2 {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Range = _Basis._Get_chunk(_Key);
const auto _This_find = _Fx(_Range._First, _Range._Last);
Expand Down Expand Up @@ -1500,6 +1502,7 @@ struct _Static_partitioned_find_end_backward2 {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Chunk_number = _Key._Chunk_number;
const auto _Range = _Basis._Get_chunk(_Key);
Expand Down Expand Up @@ -1620,6 +1623,7 @@ struct _Static_partitioned_adjacent_find2 {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Chunk_number = _Key._Chunk_number;
const auto _Range = _Basis._Get_chunk(_Key);
Expand Down Expand Up @@ -1835,6 +1839,7 @@ struct _Static_partitioned_mismatch2 {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Chunk_number = _Key._Chunk_number;
const auto _Range1 = _Basis1._Get_chunk(_Key);
Expand Down Expand Up @@ -1966,6 +1971,7 @@ struct _Static_partitioned_equal2 {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Range1 = _Basis1._Get_chunk(_Key);
const auto _Range2_first = _Basis2._Get_chunk(_Key)._First;
Expand Down Expand Up @@ -2084,6 +2090,7 @@ struct _Static_partitioned_search2 {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Range = _Basis._Get_chunk(_Key);
for (auto _Candidate = _Range._First; _Candidate != _Range._Last; ++_Candidate) {
Expand Down Expand Up @@ -2202,6 +2209,7 @@ struct _Static_partitioned_search_n2 {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Range = _Basis._Get_chunk(_Key);

Expand Down Expand Up @@ -3054,6 +3062,7 @@ struct _Static_partitioned_is_sorted_until {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

auto _Range = _Basis._Get_chunk(_Key);
auto _Next = _Range._First;
Expand Down Expand Up @@ -3169,6 +3178,7 @@ struct _Static_partitioned_is_partitioned {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

// looking at chunks from either end, moving in towards the middle
auto _Target_chunk_number = _Key._Chunk_number >> 1;
Expand Down Expand Up @@ -3281,6 +3291,7 @@ struct _Static_partitioned_is_heap_until {
if (!_Key) {
return _Cancellation_status::_Canceled;
}
// Once _Key is obtained, the amount of work should not be discarded; see GH-818.

const auto _Chunk_range_size = _Key._Size;
const auto _Chunk_offset = _Key._Start_at;
Expand Down