-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][Doc] Add draft of sycl_ext_oneapi_joint_for #14886
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
Conversation
Adds a proposed extension for encapsulating the pattern of distributing loops across the work-items in a group. Signed-off-by: John Pennycook <[email protected]>
@intel/dpcpp-specification-reviewers - I think this one might have slipped through the cracks. Friendly ping. |
sycl/doc/extensions/proposed/sycl_ext_oneapi_joint_for.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/proposed/sycl_ext_oneapi_joint_for.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/proposed/sycl_ext_oneapi_joint_for.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/proposed/sycl_ext_oneapi_joint_for.asciidoc
Outdated
Show resolved
Hide resolved
Co-authored-by: Greg Lueck <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Matches ExecutionPolicy overload of std::for_each. Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
@intel/llvm-gatekeepers, this can be merged now. |
namespace sycl::ext::oneapi::experimental { | ||
|
||
template <typename Group, typename InputIterator, typename Function> | ||
void joint_for_each(Group g, InputIterator first, InputIterator last, Function f); |
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.
Why that and not something like
for (auto &&elem : group_view_name(g, first, last)) /* ... */
?
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.
The rest of the functions in the group algorithms library are based on std::
algorithms, (e.g., std::reduce
becomes sycl::joint_reduce
, std::exclusive_scan
becomes sycl::joint_exclusive_scan
) and so following that precedent here seems the most natural: std::for_each
becomes sycl::joint_for_each
.
Adds a proposed extension for encapsulating the pattern of distributing loops across the work-items in a group.