-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rough implementation of scan algorithm. #1776
base: develop
Are you sure you want to change the base?
Conversation
…into feature/long58/sycl_scan_sort
…into feature/long58/sycl_scan_sort
{ | ||
// ::sycl::joint_inclusive_scan() | ||
using std::distance; | ||
std::copy(begin, end, out); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This copy should be parallel
auto buffAccessor = buffPtr->get_access(cgh); | ||
auto tempAccessor = tempPtr->get_access(cgh); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with how sycl::buffer objects work, do they make a copy of the data?
{ | ||
::sycl::queue* sycl_queue = sycl_res.get_queue(); | ||
|
||
using valueT = typename std::remove_reference<decltype(*begin)>::type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to use iterator_traits https://en.cppreference.com/w/cpp/iterator/iterator_traits
ii++; | ||
} while ( ii <= iterations); | ||
|
||
sycl_res.wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this wait be conditional on Async from the policy?
Summary
Adds sycl scan algorithm