Skip to content

Commit

Permalink
TestUtils::default_dpcpp_policy -> TestUtils::get_default_dpcpp_policy()
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Kopienko committed Mar 21, 2024
1 parent 93090de commit 7556605
Show file tree
Hide file tree
Showing 48 changed files with 69 additions and 61 deletions.
2 changes: 1 addition & 1 deletion test/general/header_order_ranges_0.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ main()
{
#if _ENABLE_RANGES_TESTING
using namespace oneapi::dpl::experimental::ranges;
all_of(TestUtils::default_dpcpp_policy, views::fill(-1, 10), [](auto i) { return i == -1;});
all_of(TestUtils::get_default_dpcpp_policy(), views::fill(-1, 10), [](auto i) { return i == -1; });
#endif

return TestUtils::done(_ENABLE_RANGES_TESTING);
Expand Down
2 changes: 1 addition & 1 deletion test/general/header_order_ranges_1.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ main()
{
#if _ENABLE_RANGES_TESTING
using namespace oneapi::dpl::experimental::ranges;
all_of(TestUtils::default_dpcpp_policy, views::fill(-1, 10), [](auto i) { return i == -1;});
all_of(TestUtils::get_default_dpcpp_policy(), views::fill(-1, 10), [](auto i) { return i == -1; });
#endif

return TestUtils::done(_ENABLE_RANGES_TESTING);
Expand Down
2 changes: 1 addition & 1 deletion test/general/lambda_naming.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main() {
auto buf_begin = oneapi::dpl::begin(buf);
auto buf_end = buf_begin + n;

const auto policy = TestUtils::default_dpcpp_policy;
const auto policy = TestUtils::get_default_dpcpp_policy();
auto buf_begin_discard_write = oneapi::dpl::begin(buf, sycl::write_only, sycl::property::no_init{});

::std::fill(policy, buf_begin_discard_write, buf_begin_discard_write + n, 1);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/iterator/permutation_iterator.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ main()
"Wrong result of std::distance<permutationIterator1, permutationIterator2)");

std::vector<int> resultCopy(perm_size_result);
auto itCopiedDataEnd = dpl::copy(TestUtils::default_dpcpp_policy, permItBegin, permItEnd, resultCopy.begin());
auto itCopiedDataEnd = dpl::copy(TestUtils::get_default_dpcpp_policy(), permItBegin, permItEnd, resultCopy.begin());
EXPECT_EQ(true, resultCopy.end() == itCopiedDataEnd, "Wrong result of dpl::copy");

const std::vector<int> expectedCopy = {0, 2, 4, 6, 8, 10, 12, 14, 16, 18};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ main()
{
sycl::buffer<int> A(data, sycl::range<1>(n));

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ main()
sycl::buffer<int> A(data1, sycl::range<1>(max_n));
sycl::buffer<int> B(data2, sycl::range<1>(max_n));

auto exec1 = TestUtils::default_dpcpp_policy;
auto exec1 = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec1);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec1);
auto exec3 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec1);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/copy_if_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ main()

auto src = views::iota(0, max_n);

auto exec1 = TestUtils::default_dpcpp_policy;
auto exec1 = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec1);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec1);
auto exec3 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec1);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/copy_ranges_factory_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ main()
auto view = iota_view(0, max_n) | views::transform(lambda1);
auto range_res = all_view<int, sycl::access::mode::write>(B);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/copy_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ main()
auto view = views::reverse(sv) | views::transform(lambda1);
auto range_res = all_view<int, sycl::access::mode::write>(B);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/count_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ main()

auto view = views::all(A);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/equal_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main()

auto view = views::all(A);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/exclusive_scan_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ main()
auto view = ranges::all_view<int, sycl::access::mode::read>(A);
auto view_res1 = ranges::all_view<int, sycl::access::mode::write>(B1);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

ranges::exclusive_scan(exec, A, view_res1, 100);
ranges::exclusive_scan(make_new_policy<new_kernel_name<Policy, 0>>(exec), view, B2, 100, ::std::plus<int>());
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/fill_generate_factory.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ main()
sycl::buffer<int> A(expected1, sycl::range<1>(max_n));
sycl::buffer<int> B(expected2, sycl::range<1>(max_n));

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/find_end_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ main()
auto view_a = all_view(A);
auto view_b = all_view(B);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/find_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ main()

auto view = all_view(A);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

res1 = find(make_new_policy<new_kernel_name<Policy, 0>>(exec), view, val); //check passing all_view
res1 = find(make_new_policy<new_kernel_name<Policy, 1>>(exec), A, val); //check passing sycl::buffer directly
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/for_each_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ main()
{
sycl::buffer<int> A(data, sycl::range<1>(max_n));

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/inclusive_scan_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ main()
auto view_res2 = ranges::all_view<int, sycl::access::mode::write>(B2);
auto view_res3 = ranges::all_view<int, sycl::access::mode::write>(B3);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

ranges::inclusive_scan(exec, A, view_res1);
ranges::inclusive_scan(make_new_policy<new_kernel_name<Policy, 0>>(exec), view, B2, ::std::plus<int>());
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/is_sorted_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ main()
sycl::buffer<int> A(data1, sycl::range<1>(max_n));
sycl::buffer<int> B(data2, sycl::range<1>(max_n));

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

res1 = is_sorted(exec, all_view(A));
res2 = is_sorted(make_new_policy<new_kernel_name<Policy, 0>>(exec), B);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/is_sorted_until_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ main()

auto view = all_view(A);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

res1 = is_sorted_until(exec, view);
res2 = is_sorted_until(make_new_policy<new_kernel_name<Policy, 0>>(exec), A, [](auto a, auto b) { return a < b; });
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/merge_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ main()
sycl::buffer<T> D(out1, sycl::range<1>(out_n));
sycl::buffer<T> E(out2, sycl::range<1>(out_n));

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();

merge(exec, all_view(A), all_view(B), all_view<T, sycl::access::mode::write>(D));
merge(TestUtils::make_device_policy<class merge_2>(exec), A, B, E, ::std::less<T>()); //check passing sycl buffers directly
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/minmax_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ main()

auto view = all_view(A);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

//min element
res1 = min_element(exec, A);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/move_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ main()

auto range_res = all_view<int, sycl::access::mode::write>(B);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ main()
using namespace TestUtils;
using namespace oneapi::dpl::experimental::ranges;

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();

auto res = reduce_by_segment(exec, views::all_read(A), views::all_read(B), views::all_write(C), views::all_write(D));

Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/reduce_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ main()

auto view = all_view<int, sycl::access::mode::read>(A);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

res1 = reduce(exec, A);
res2 = reduce(make_new_policy<new_kernel_name<Policy, 0>>(exec), view, 100);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/remove_if_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main()
{
sycl::buffer<T> A(in.data(), sycl::range<1>(in.size()));

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/remove_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main()
{
sycl::buffer<T> A(in.data(), sycl::range<1>(in.size()));

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ main()
sycl::buffer<int> A(max_n);

auto src = views::iota(0, max_n);
auto res = replace_copy_if(TestUtils::default_dpcpp_policy, src, A, pred, new_val);
auto res = replace_copy_if(TestUtils::get_default_dpcpp_policy(), src, A, pred, new_val);

//check result
int expected[max_n];
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/replace_copy_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ main()
sycl::buffer<int> A(max_n);

auto src = views::fill(old_val, max_n);
auto res = replace_copy(TestUtils::default_dpcpp_policy, src, A, old_val, new_val);
auto res = replace_copy(TestUtils::get_default_dpcpp_policy(), src, A, old_val, new_val);

//check result
EXPECT_TRUE(res == max_n, "wrong result from replace_copy");
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/replace_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main()

auto view = views::all(A);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/reverse_copy_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ main()
sycl::buffer<int> A(max_n);

auto src = views::iota(0, max_n);
auto res = reverse_copy(TestUtils::default_dpcpp_policy, src, A);
auto res = reverse_copy(TestUtils::get_default_dpcpp_policy(), src, A);

//check result
EXPECT_TRUE(res == max_n, "wrong result from reverse_copy");
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/reverse_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ main()
auto iota = views::iota(0, max_n);
//the name nano::ranges::copy is not injected into oneapi::dpl::experimental::ranges namespace
__nanorange::nano::ranges::copy(iota, views::host_all(A).begin());
reverse(TestUtils::default_dpcpp_policy, A);
reverse(TestUtils::get_default_dpcpp_policy(), A);

for(auto v: views::host_all(A))
::std::cout << v << " ";
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/rotate_copy_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ main()
sycl::buffer<int> A(max_n);

auto src = views::iota(0, max_n);
auto res = rotate_copy(TestUtils::default_dpcpp_policy, src, rotate_val, A);
auto res = rotate_copy(TestUtils::get_default_dpcpp_policy(), src, rotate_val, A);

//check result
EXPECT_TRUE(res == max_n, "wrong result from rotate_copy");
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/rotate_view_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ main()
{
sycl::buffer<int> A(data, sycl::range<1>(max_n));
sycl::buffer<int> B(expected, sycl::range<1>(max_n));
ranges::copy(TestUtils::default_dpcpp_policy,
ranges::copy(TestUtils::get_default_dpcpp_policy(),
ranges::views::all_read(A) | ranges::views::rotate(rotate_val), ranges::views::all_write(B));
}

Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/search_n_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main()

auto view_a = all_view(A);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/search_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ main()
auto view_a = all_view(A);
auto view_b = all_view(B);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

res1 = search(exec, A, view_b);
res2 = search(make_new_policy<new_kernel_name<Policy, 0>>(exec), view_a, B, [](auto a, auto b) { return a == b; });
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/sort_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ main()
using namespace TestUtils;
using namespace oneapi::dpl::experimental::ranges;

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
{
sycl::buffer<int> A(data1, sycl::range<1>(max_n));
sycl::buffer<int> B(data2, sycl::range<1>(max_n));
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/stable_sort_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ main()
sycl::buffer<int> A(data1, sycl::range<1>(max_n));
sycl::buffer<int> B(data2, sycl::range<1>(max_n));

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

stable_sort(exec, A); //check passing sycl buffer directly
stable_sort(make_new_policy<new_kernel_name<Policy, 0>>(exec), all_view<int, sycl::access::mode::read_write>(B),
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/swap_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main()
sycl::buffer<int> C(data3, sycl::range<1>(max_n_2));
sycl::buffer<int> D(data4, sycl::range<1>(max_n));

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ main()
auto view = iota_view(0, max_n) | views::transform(lambda1);
auto range_res = all_view<int, sycl::access::mode::write>(B);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel_api/ranges/transform2_ranges_sycl.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ main()
auto view = views::reverse(sv) | views::transform(lambda1);

auto range_res = all_view<int, sycl::access::mode::write>(B);
transform(TestUtils::default_dpcpp_policy, view, view, range_res, lambda2);
transform(TestUtils::get_default_dpcpp_policy(), view, view, range_res, lambda2);
}

//check result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ main()
auto view = ranges::all_view<int, sycl::access::mode::read>(A);
auto view_res = ranges::all_view<int, sycl::access::mode::write>(B);

auto exec = TestUtils::default_dpcpp_policy;
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);
auto exec1 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 0>>(exec);
auto exec2 = TestUtils::make_new_policy<TestUtils::new_kernel_name<Policy, 1>>(exec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ main()
auto view = ranges::all_view<int, sycl::access::mode::read>(A);
auto view_res1 = ranges::all_view<int, sycl::access::mode::write>(B1);

auto exec = TestUtils::default_dpcpp_policy;
using Policy = decltype(TestUtils::default_dpcpp_policy);
auto exec = TestUtils::get_default_dpcpp_policy();
using Policy = decltype(exec);

ranges::transform_inclusive_scan(exec, A, view_res1, ::std::plus<int>(), lambda);
ranges::transform_inclusive_scan(make_new_policy<new_kernel_name<Policy, 0>>(exec), view, B2, ::std::plus<int>(), lambda, init);
Expand Down
Loading

0 comments on commit 7556605

Please sign in to comment.