cuCollections
cuCollections copied to clipboard
[FEA] dynamic_map device-side API
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:
- 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.
- The size field of the
dynamic_mapas well as its constituentstatic_mapobjects needs to be updated as the device-sideinsertis used. This could potentially be done automatically, such as with an RAII wrapper around thedevice_mutable_viewobject. It could also be done manually by the user.