c++cudagpubitsetgpu-shared-memory

C++ bitset in CUDA


I have an existing C++ code that extensively uses the bitset template. I am porting this code to CUDA C, and I am really new to CUDA programming. Can I use the bitset template as a __shared__ variable?


Solution

  • As far as I know, you can't use the bitset container in CUDA at all, because there is no device implementation of it. It should be trivial to implement it in terms of a regular array though, and you can put the array in shared memory.