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
After thinking about this more, I came to the conclusion that returning an Array-of-Structs (AoS) is actually preferable for the DeviceSegmentedReduce. It is flexible in the sense that users can write to an AoS or, using a zip or transform iterator, writing to two distinct output iterators.
While it would be possible to also implement both versions with an interface that takes two distinct iterators, one for the extrema and one for their indexes by using an iterator like proposed in #3698, it would likely be less efficient, as it would require two memory transactions for writing the two members. Whereas, this scenario could be done in a single memory transaction writing the whole (extremum, index)-tuple at once, when using the single output iterator.
Ultimately, we want to transition to returning a ::cuda::std::pair or ::cuda::std::tuple instead of a cub::KeyValuePair.
The text was updated successfully, but these errors were encountered:
After thinking about this more, I came to the conclusion that returning an Array-of-Structs (AoS) is actually preferable for the
DeviceSegmentedReduce
. It is flexible in the sense that users can write to an AoS or, using a zip or transform iterator, writing to two distinct output iterators.While it would be possible to also implement both versions with an interface that takes two distinct iterators, one for the extrema and one for their indexes by using an iterator like proposed in #3698, it would likely be less efficient, as it would require two memory transactions for writing the two members. Whereas, this scenario could be done in a single memory transaction writing the whole (extremum, index)-tuple at once, when using the single output iterator.
Ultimately, we want to transition to returning a
::cuda::std::pair
or::cuda::std::tuple
instead of acub::KeyValuePair
.The text was updated successfully, but these errors were encountered: