Skip to content

Commit

Permalink
Set the SYCL ArrayPartialSum as a sequential implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lumurillo committed Oct 13, 2024
1 parent d3e68ea commit 09860d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpp/open3d/t/geometry/RaycastingScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,9 +793,10 @@ struct RaycastingScene::SYCLImpl : public RaycastingScene::Impl {

void ArrayPartialSum(int* input, int* output, size_t num_elements) override {
queue_.submit([&](sycl::handler& cgh) {
cgh.parallel_for(sycl::range<1>(num_elements - 1), [=](sycl::id<1> i) {
size_t idx = i[0] + 1;
output[idx] = output[idx - 1] + input[idx - 1];
cgh.single_task([=]() {
for (size_t idx = 1; idx < num_elements; ++idx) {
output[idx] = output[idx - 1] + input[idx - 1];
}
});
});

Expand Down

0 comments on commit 09860d0

Please sign in to comment.