From deab41cc9b23c98fe822dcead327f3c232ea382a Mon Sep 17 00:00:00 2001 From: Dan Hoeflinger Date: Thu, 16 May 2024 14:14:12 -0400 Subject: [PATCH] specify unique kernel names --- help_function/src/onedpl_test_sort_by_key.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/help_function/src/onedpl_test_sort_by_key.cpp b/help_function/src/onedpl_test_sort_by_key.cpp index 09f583af8..a04295916 100644 --- a/help_function/src/onedpl_test_sort_by_key.cpp +++ b/help_function/src/onedpl_test_sort_by_key.cpp @@ -108,6 +108,7 @@ int main() { // #14 SORT BY KEY TEST // { + sycl::queue myQueue; const int N = 6; sycl::buffer keys_buf{ sycl::range<1>(N) }; sycl::buffer values_buf{ sycl::range<1>(N) }; @@ -124,7 +125,7 @@ int main() { } // call algorithm: - dpct::sort(oneapi::dpl::execution::dpcpp_default, keys_it, keys_it + N, values_it); + dpct::sort(oneapi::dpl::execution::make_device_policy(myQueue), keys_it, keys_it + N, values_it); // keys is now { 1, 2, 4, 5, 7, 8} // values is now {'a', 'c', 'b', 'e', 'f', 'd'} @@ -170,7 +171,7 @@ int main() { auto keys_end = dpct::device_pointer(keysArray + 10); auto values_begin = dpct::device_pointer(valuesArray); // call algorithm - dpct::sort(oneapi::dpl::execution::make_device_policy<>(myQueue), keys_begin, keys_end, values_begin); + dpct::sort(oneapi::dpl::execution::make_device_policy(myQueue), keys_begin, keys_end, values_begin); } // copy back