Not able to find any consensus operation for device

Hey

I am currently working on concurrent data structures and my work is to apply that on GPUs. But the problem that I am facing is I do not know If CUDA programming supports any instruction or primitives like compareAndSet or getAndSet for consensus.

I am almost stuck in this. If anybody can help me in finding these type of primitive instructions or how to indirectly construct those in software, It would be much useful to me.

Thanks in advance.
:shifty: Looking forward to your reply.

I assume you are looking for atomicCAS(). Check appendix B of the programming guide.

Thanks. I guess this works for me. :thumbup:

just for correction- It is in appendix C

NVIDIA likes to change things around, we are probably looking at programming guides from different versions of CUDA :)