Skip to content

[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

Merged
merged 5 commits into from
Sep 3, 2024

Conversation

Pennycook
Copy link
Contributor

Adds a proposed extension for encapsulating the pattern of distributing loops across the work-items in a group.

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]>
@Pennycook Pennycook added the spec extension All issues/PRs related to extensions specifications label Jul 31, 2024
@Pennycook Pennycook requested a review from a team as a code owner July 31, 2024 22:02
@Pennycook
Copy link
Contributor Author

@intel/dpcpp-specification-reviewers - I think this one might have slipped through the cracks. Friendly ping.

Pennycook and others added 4 commits August 30, 2024 16:05
Co-authored-by: Greg Lueck <[email protected]>
Matches ExecutionPolicy overload of std::for_each.

Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
@Pennycook
Copy link
Contributor Author

@intel/llvm-gatekeepers, this can be merged now.

@sommerlukas sommerlukas merged commit 862cc9d into intel:sycl Sep 3, 2024
2 checks passed
namespace sycl::ext::oneapi::experimental {

template <typename Group, typename InputIterator, typename Function>
void joint_for_each(Group g, InputIterator first, InputIterator last, Function f);
Copy link
Contributor

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)) /* ... */

?

Copy link
Contributor Author

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.

@Pennycook Pennycook deleted the sycl_ext_oneapi_joint_for branch September 3, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec extension All issues/PRs related to extensions specifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants