You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an additional family of reductions without identity value only for those types that are default constructible. That version assumes that the default value for the type is the identity value. Not that this is consistent with addition in numeric types.
@droccom has raised in comments at issue #290 if we should provide reduce either with an identity value or an initial value. Rationale is being aligned with std::reduce
We need to discuss this in detail to make a decision.
If the target is strict consistency with std::reduce, there should be no way to both avoiding the initial value and using a custom binary operator (only std::plus<> is supported).
I think this case is very specific, so I suggest to either:
a. avoid adding it to the GrPPI API;
b. extend it to support generic binary operators (relaxing consistency with std::reduce)
Add an additional family of reductions without identity value only for those types that are default constructible. That version assumes that the default value for the type is the identity value. Not that this is consistent with addition in numeric types.
This issue partiallly solves #290
The text was updated successfully, but these errors were encountered: