From 1e9f02d3ab8dd7132ff2643d164e5efc31a13060 Mon Sep 17 00:00:00 2001 From: Benjamin Brock Date: Wed, 9 Oct 2024 08:07:58 -0700 Subject: [PATCH] Fix scatter-style local range to distributed range copies --- include/dr/sp/algorithms/copy.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/dr/sp/algorithms/copy.hpp b/include/dr/sp/algorithms/copy.hpp index e035bcd392..7116212053 100644 --- a/include/dr/sp/algorithms/copy.hpp +++ b/include/dr/sp/algorithms/copy.hpp @@ -120,8 +120,10 @@ sycl::event copy_async(InputIt first, InputIt last, OutputIt d_first) { auto local_last = first; rng::advance(local_last, n_to_copy); + auto &&q = __detail::queue(ranges::rank(segment)); + events.emplace_back( - dr::sp::copy_async(first, local_last, rng::begin(segment))); + dr::sp::copy_async(q, first, local_last, rng::begin(segment))); ++segment_iter; rng::advance(first, n_to_copy);