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.``
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.``