Skip to content

Conversation

@Pennycook
Copy link
Contributor

This PR makes three clarifications:

  • When an algorithm accepts a pointer, it can be a multi_ptr;
  • When an algorithm accepts a value, it can be a vec or marray;
  • When an algorithm accepts a value, it can be sycl::half.

A list of types compatible with group algorithms is removed in favor of listing the types explicitly for each algorithm, since some algorithms have different constraints (e.g., some algorithms support all trivially copyable types).

Closes #340 and closes #461.


Two other things to note here...

I deliberately didn't add __swizzle__, because I don't think that was part of our original intent. We could explore this as an extension, but adding the overloads for __swizzle__ is non-trivial; the return type would have to be different (i.e., vec), and I don't think existing implementations actually support this case.

I realize that the group algorithms section is now really long and repetitive, but my goal with this PR is simply to fix the wording. The section would definitely benefit from another formatting and consolidation pass. Defining a term that means "C++ fundamental type, half, marray or vec would also help.

This commit makes two clarifications:

- When an algorithm accepts a pointer, it can be a multi_ptr; and
- When an algorithm accepts a value, it can be a vec or marray.

A list of types compatible with group algorithms is removed in favor
of listing the types explicitly for each algorithm, since some algorithms
have different constraints.
This note had been duplicated for group functions and group algorithms.
The note about group algorithms was removed in a previous commit.
@TApplencourt
Copy link
Contributor

Look good, but should CTS but updated?

@Pennycook Pennycook added the Agenda To be discussed during a SYCL committee meeting label Mar 10, 2025
@tomdeakin
Copy link
Contributor

Blocked by #765

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gmlueck gmlueck removed the Agenda To be discussed during a SYCL committee meeting label Apr 24, 2025
@Pennycook Pennycook added the clarification Something is unclear label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should the reduce and scan group algorithms support marray/vec? Reductions and scans: types allowed

5 participants