Unordered_maps with complex containers
Don't know if this feature already exists but do unordered_maps support structures other than <int,int> like <int,stdgpu::unordered_set
This library is excellent btw! Solves so many issues with support for STL like containers for GPU :)
Yes, in principle arbitrary types for the Key and T types of stdgpu::unordered_map container (stdgpu::unordered_setlikewise) are supported. int, int is just one very simple choice in the examples. You can use any type with the corresponding hash function. The only requirement is that the hash function is callable both on the host and the device, i.e. it should have the __host__ __device__ attribute for CUDA code or the portable STDGPU_HOST_DEVICE version.
Nesting containers, i.e. stdgpu::unordered_map<int, stdgpu::unordered_map<int, float>, is not prohibited, but not fully supported as in the C++ standard library due to the more complicated memory handling for GPU code. stdgpu::unordered_map<thrust::pair<int, int>, float> might be better in such cases.