Rework `prif_co_reduce` implementation
ktras opened this issue · 3 comments
Rework the prif_co_reduce
implementation to stop using the current strategy involving the abstract interfaces for the various C interoperable types. This may be a prerequisite to supporting non-blocking co_reduce
.
We should also allow it to support reduction on derived types. See #72
Tangential note: Motivated by this use case, we've opened two relevant GASNet-EX enhancement requests that would each eventually help enable Caffeine to provide non-blocking co_reduce
for all allowed types:
- Bug 4696 - RFE: user_cdata cleanup for reduction operations
- Bug 4697 - RFE: provide more data to user-defined reduction operators
Hopefully at least one of these will be deployed by the time we reach that stage.
This is orthogonal to the cleanups needed for the current blocking co_reduce
implementation.
Another related task for cleaning up co_reduce
implementation:
Stop repeatedly calling caf_same_cfi_type()
in co_reduce
(each of which entails a cross-language call) and instead use select type
to make this faster for at least the built-in types.