gmemon
gmemon

Reputation: 2731

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?

Upvotes: 1

Views: 1570

Answers (1)

Roger Dahl
Roger Dahl

Reputation: 15734

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.

Upvotes: 3

Related Questions