diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/exclusive_scan.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/exclusive_scan.hpp index a2b434fff0e..82b4b55399a 100644 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/exclusive_scan.hpp +++ b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/exclusive_scan.hpp @@ -41,7 +41,7 @@ exclusive_scan_impl_(ExecutionPolicy&& policy, R&& r, O&& o, U init, BinaryOp bi { using T = stdrng::range_value_t; - static_assert(std::is_same_v, distributed_device_policy>); + static_assert(std::is_same_v, sycl_device_collection>); auto zipped_view = views::zip(r, o); auto zipped_segments = zipped_view.zipped_segments(); diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/execution_policy.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/execution_policy.hpp index 10f06257061..0a32694d05c 100644 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/execution_policy.hpp +++ b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/execution_policy.hpp @@ -23,15 +23,15 @@ namespace oneapi::dpl::experimental::dr::sp { -struct distributed_device_policy +struct sycl_device_collection { - distributed_device_policy(sycl::device device) : devices_({device}) {} - distributed_device_policy(sycl::queue queue) : devices_({queue.get_device()}) {} + sycl_device_collection(sycl::device device) : devices_({device}) {} + sycl_device_collection(sycl::queue queue) : devices_({queue.get_device()}) {} - distributed_device_policy() : devices_({sycl::queue{}.get_device()}) {} + sycl_device_collection() : devices_({sycl::queue{}.get_device()}) {} template - requires(std::is_same_v, sycl::device>) distributed_device_policy(R&& devices) + requires(std::is_same_v, sycl::device>) sycl_device_collection(R&& devices) : devices_(stdrng::begin(devices), stdrng::end(devices)) { } diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/for_each.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/for_each.hpp index 57c2edbf867..49872f1e3e4 100644 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/for_each.hpp +++ b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/for_each.hpp @@ -32,7 +32,7 @@ void for_each(ExecutionPolicy&& policy, R&& r, Fn fn) { static_assert( // currently only one policy supported - std::is_same_v, distributed_device_policy>); + std::is_same_v, sycl_device_collection>); std::vector events; diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/inclusive_scan.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/inclusive_scan.hpp index 52a192c8565..6853508ba1d 100644 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/inclusive_scan.hpp +++ b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/inclusive_scan.hpp @@ -42,13 +42,12 @@ inclusive_scan_impl_(ExecutionPolicy&& policy, R&& r, O&& o, BinaryOp binary_op, { using T = stdrng::range_value_t; - static_assert(std::is_same_v, distributed_device_policy>); + static_assert(std::is_same_v, sycl_device_collection>); auto zipped_view = views::zip(r, o); auto zipped_segments = zipped_view.zipped_segments(); std::vector events; - auto root = devices()[0]; device_allocator allocator(context(), root); vector> partial_sums(std::size_t(zipped_segments.size()), allocator); diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/reduce.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/reduce.hpp index 760ab35619b..97925fd1f91 100644 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/reduce.hpp +++ b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/reduce.hpp @@ -69,11 +69,10 @@ T reduce(ExecutionPolicy&& policy, R&& r, T init, BinaryOp binary_op) { - static_assert(std::is_same_v, distributed_device_policy>); + static_assert(std::is_same_v, sycl_device_collection>); using future_t = decltype(reduce_async(__detail::dpl_policy(0), ranges::segments(r)[0].begin(), ranges::segments(r)[0].end(), init, binary_op)); - std::vector futures; for (auto&& segment : ranges::segments(r)) diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/transform.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/transform.hpp index 2a516cb465e..48507fcc638 100644 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/transform.hpp +++ b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/algorithms/transform.hpp @@ -42,7 +42,7 @@ transform(ExecutionPolicy&& policy, distributed_range auto&& in, distributed_ite { static_assert( // currently only one policy supported - std::is_same_v, distributed_device_policy>); + std::is_same_v, sycl_device_collection>); std::vector events; using OutT = typename decltype(out)::value_type; diff --git a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/init.hpp b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/init.hpp index 1a5c85d52df..f7917469e88 100644 --- a/include/oneapi/dpl/internal/distributed_ranges_impl/sp/init.hpp +++ b/include/oneapi/dpl/internal/distributed_ranges_impl/sp/init.hpp @@ -82,7 +82,7 @@ nprocs() return __detail::ngpus(); } -inline distributed_device_policy par_unseq; +inline sycl_device_collection par_unseq; template inline void @@ -100,7 +100,7 @@ init(R&& devices) requires(std::is_same_v