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

Consider allowing the regular reference for the single-component reducer types #1777

Open
artv3 opened this issue Dec 5, 2024 · 0 comments

Comments

@artv3
Copy link
Member

artv3 commented Dec 5, 2024

Drawing from the conversation in: #1759 (comment)

From @trws:

`` On the *loc objects, it makes sense to me to have a helper type for those that has an loc or similar on it, but why not allow the regular reference for the single-component types? It's sometimes useful to do different operations in the body than at the actual reduction. Usually that's for things like getting a per-thread value, like "max iterations computed by one thread" or similar, but it does occasionally come up.

To be explicit, I think the ValOp types are a good idea like the strongly-typed indexes, but it seems like something that should be optional rather than required. Also, I would expect to be able to get it by doing RAJA::expt::Reduce<RAJA::operators::plus, int>::arg_type, or decltype(RAJA::expt::ReduceRAJA::operators::plus(&sum))::arg_type, or similar so the declaration for the type used to pass in the reducer provides the appropriate ValOp type.``

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

No branches or pull requests

1 participant