Can I use Atomic Operation for cuDoubleComplex type in CUDA?

Hi everyone !

I see in CUDA: Atomic Operation use for Integer, float type, but can’t use for cuDoubleComplex type .

I need use Atomic for cuDoubleComplex type , anybody help me?

Thanks very much !

The maximum atomic data size using any method I’m familiar with is 64 bits. Since a cuDoubleComplex type is 128 bits (two 8-byte quantities) you won’t be able to use an ordinary atomic operation on that anyway.

Using some craftiness, you could use a 64-bit atomic on a cuFloatComplex type.

Or else you will need to come up with some other approach that doesn’t require atomics, or else uses some sort of semaphore to control access (very slow and fragile code).