cuCollections icon indicating copy to clipboard operation
cuCollections copied to clipboard

Add static_map::insert_or_apply aka reduce-by-key

Open sleeepyjack opened this issue 2 years ago • 0 comments

This PR adds a function static_map::insert_or_apply, which either inserts a new key-value pair into the map, or, in case the key already exists, applies a reduction function over the associated value.

This effectively replaces the former cuco::static_reduction_map and thus superseeds #98.

Closes #82

sleeepyjack avatar Oct 14 '23 00:10 sleeepyjack