Skip to content

Commit ba90917

Browse files
committed
Fix build errors in remove_copy.pass, find.pass and search_n.pass
1 parent ce07e64 commit ba90917

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/parallel_api/algorithm/alg.modifying.operations/fill.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void test_empty_list_initialization_for_fill()
125125
#if TEST_DPCPP_BACKEND_PRESENT
126126
std::vector<int> v{3,6,5,4,3,7,8,0,2,4};
127127
sycl::buffer<int> buf(v);
128-
auto it = oneapi::dpl::fill(oneapi::dpl::execution::dpcpp_default, oneapi::dpl::begin(buf), oneapi::dpl::end(buf), {});
128+
oneapi::dpl::fill(oneapi::dpl::execution::dpcpp_default, oneapi::dpl::begin(buf), oneapi::dpl::end(buf), {});
129129
EXPECT_TRUE(std::count(v.begin(), v.end(), 0) == v.size(), "a sequence is not filled properly by oneapi::dpl::fill with `device_policy` policy");
130130
#endif
131131
}

test/parallel_api/algorithm/alg.modifying.operations/remove_copy.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void test_empty_list_initialization()
169169
sycl::buffer<int> dest_buf(v);
170170
auto it = oneapi::dpl::remove_copy(oneapi::dpl::execution::dpcpp_default, oneapi::dpl::begin(buf), oneapi::dpl::end(buf), oneapi::dpl::begin(dest_buf), {});
171171
EXPECT_TRUE(it.get_idx() == 7, "not all empty list-initialized values are properly remove_copy by oneapi::dpl::remove_copy with `device_policy` policy");
172-
dest.erase(it, dest.end());
172+
dest.erase(dest.begin() + it.get_idx(), dest.end());
173173
EXPECT_TRUE(dest == expected, "wrong effect from calling oneapi::dpl::remove_copy with empty list-initialized value and with `device_policy` policy");
174174
#endif
175175
}

test/parallel_api/algorithm/alg.nonmodifying/search_n.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void test_empty_list_initialization()
137137
}
138138
#if TEST_DPCPP_BACKEND_PRESENT
139139
sycl::buffer<int> buf(v);
140-
auto it = oneapi::dpl::search_n(oneapi::dpl::execution::dpcpp_default, oneapi::dpl::begin(buf), oneapi::dpl::end(buf), {});
140+
auto it = oneapi::dpl::search_n(oneapi::dpl::execution::dpcpp_default, oneapi::dpl::begin(buf), oneapi::dpl::end(buf), 4, {});
141141
EXPECT_TRUE(it.get_idx() == 4, "an empty list-initialized value is not found by oneapi::dpl::search_n with `device_policy` policy");
142142
#endif
143143
}

0 commit comments

Comments
 (0)