diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find1.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find1.cpp index 8f7ba5e7589a..fce18239e11e 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find1.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find1.cpp @@ -34,9 +34,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 1, 5, 2, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 2, 1, 2, 3, 3, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find2.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find2.cpp index e61ccd6c4d2b..158f9af4a465 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find2.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_adjacent_find2.cpp @@ -34,9 +34,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 1, 5, 2, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 2, 1, 2, 3, 3, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of1.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of1.cpp index d363e73b2b86..65f24bdc64a5 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of1.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of1.cpp @@ -29,16 +29,17 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } struct op5 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 5; } @@ -47,7 +48,7 @@ struct op5 struct op0 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 0; } @@ -56,7 +57,7 @@ struct op0 struct op8 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 8; } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of2.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of2.cpp index 0ef3d63201ed..3b26d3a07476 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of2.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_all_of2.cpp @@ -29,16 +29,17 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } struct op5 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 5; } @@ -47,7 +48,7 @@ struct op5 struct op0 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 0; } @@ -56,7 +57,7 @@ struct op0 struct op8 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 8; } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of1.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of1.cpp index 127ba5880133..0fb2703bde82 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of1.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of1.cpp @@ -29,16 +29,17 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } struct op5 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 5; } @@ -47,7 +48,7 @@ struct op5 struct op0 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 0; } @@ -56,7 +57,7 @@ struct op0 struct op8 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 8; } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of2.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of2.cpp index f4088dcc00d5..21efe43a41f0 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of2.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_any_of2.cpp @@ -29,16 +29,17 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } struct op5 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 5; } @@ -47,7 +48,7 @@ struct op5 struct op0 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 0; } @@ -56,7 +57,7 @@ struct op0 struct op8 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 8; } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element1.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element1.cpp index f580fd7c1827..9ab993b923de 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element1.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element1.cpp @@ -31,9 +31,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 6, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 6, 2, 3, 4, 5, 6, 5, 6, 6, 2, 3, 4, 6, 6, 2, 3, 4, 5, 4, 3, 2, 6, 6, 2, 3, 4, 6, 2, 3, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 5, 8, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element2.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element2.cpp index ff64d71780f3..eef3ac0e1c51 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element2.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_max_element2.cpp @@ -31,9 +31,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 6, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 6, 2, 3, 4, 5, 6, 5, 6, 6, 2, 3, 4, 6, 6, 2, 3, 4, 5, 4, 3, 2, 6, 6, 2, 3, 4, 6, 2, 3, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 5, 8, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element1.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element1.cpp index 07a26115f608..2a7e4768a2ad 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element1.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element1.cpp @@ -31,9 +31,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 6, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 6, 2, 3, 4, 5, 6, 5, 6, 6, 2, 3, 4, 6, 6, 2, 3, 4, 5, 4, 3, 2, 6, 6, 2, 3, 4, 6, 2, 3, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 5, 8, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element2.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element2.cpp index d7179b2ad8a2..34a56def97b6 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element2.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_min_element2.cpp @@ -31,9 +31,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 6, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 6, 2, 3, 4, 5, 6, 5, 6, 6, 2, 3, 4, 6, 6, 2, 3, 4, 5, 4, 3, 2, 6, 6, 2, 3, 4, 6, 2, 3, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 5, 8, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element1.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element1.cpp index 278820fe9fb4..9e2066fb4b3c 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element1.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element1.cpp @@ -31,9 +31,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 6, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 6, 2, 3, 4, 5, 6, 5, 6, 6, 2, 3, 4, 6, 6, 2, 3, 4, 5, 4, 3, 2, 6, 6, 2, 3, 4, 6, 2, 3, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 5, 8, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element2.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element2.cpp index c2e2b595e9a3..80dfee171ded 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element2.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_minmax_element2.cpp @@ -31,9 +31,10 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 6, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 6, 2, 3, 4, 5, 6, 5, 6, 6, 2, 3, 4, 6, 6, 2, 3, 4, 5, 4, 3, 2, 6, 6, 2, 3, 4, 6, 2, 3, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 5, 8, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none1.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none1.cpp index 8b70a21753b2..bb87eac2d466 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none1.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none1.cpp @@ -29,16 +29,17 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } struct op5 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 5; } @@ -47,7 +48,7 @@ struct op5 struct op0 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 0; } @@ -56,7 +57,7 @@ struct op0 struct op8 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 8; } diff --git a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none2.cpp b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none2.cpp index 22ffe5f018d3..5088bca7a75a 100644 --- a/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none2.cpp +++ b/libs/full/segmented_algorithms/tests/unit/partitioned_vector_none2.cpp @@ -29,16 +29,17 @@ void initialize(hpx::partitioned_vector& xvalues) T init_array[SIZE] = {1, 2, 3, 4, 5, 1, 2, 3, 3, 5, 5, 3, 4, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 6, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 5, 7, 5, 4, 2, 3, 4, 5, 2}; - for (int i = 0; i < SIZE; i++) + typename hpx::partitioned_vector::iterator it = xvalues.begin(); + for (int i = 0; i < SIZE; i++, it++) { - xvalues.set_value(i, init_array[i]); + *it = init_array[i]; } } struct op5 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 5; } @@ -47,7 +48,7 @@ struct op5 struct op0 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 0; } @@ -56,7 +57,7 @@ struct op0 struct op8 { template - bool operator()(T& value) + bool operator()(T& value) const { return value > 8; }