Skip to content
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

Require explicit initialization values for reductions #1674

Open
rhornung67 opened this issue Jun 18, 2024 · 0 comments
Open

Require explicit initialization values for reductions #1674

rhornung67 opened this issue Jun 18, 2024 · 0 comments

Comments

@rhornung67
Copy link
Member

In our "old" reduction interface (where a user creates a reduction object which is puled into a kernel via lambda capture), we provide a default initial value for a reduction if a user does not explicitly provide one by passing a value to the reduction object ctor. The default value is chosen based on the type of the reduction value (template parameter to reduction object) and the reduction (object) type.

It would be more consistent with other parallel programming models (e.g., OpenMP) if we required users to explicitly provide reduction initialization values. It may also ensure the user gets what they want in some cases. Since this could potentially be a breaking change for some users, we'll do a major release after implementing this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant