cuCollections icon indicating copy to clipboard operation
cuCollections copied to clipboard

[FEA] dynamic_map device-side API

Open Nicolas-Iskos opened this issue 6 years ago • 0 comments

Currently, the dynamic_map has only a host-side API, which supports insert, find, contains. It would be useful to have an additional, advanced-usage API supporting __device__ versions of insert, find, and contains.

There are some important considerations in designing this API:

  1. The map will not be able to dynamically resize when using the device-side API. This is because control must be returned to the host to resize. There is no preventing the user from inserting too many keys for the capacity of the map.
  2. The size field of the dynamic_map as well as its constituent static_map objects needs to be updated as the device-side insert is used. This could potentially be done automatically, such as with an RAII wrapper around the device_mutable_view object. It could also be done manually by the user.

Nicolas-Iskos avatar Jul 31 '20 16:07 Nicolas-Iskos