Can __device__ function operate atomicOr()?


My code calls the kernel, and the kernel checks operation needs.

and then in the kernel call the device function.

at that function, can I use the atomicOr (i.e., I wonder about using atomicOr in the device function)

because I learned operation is possible only in the kernel, but access is possible in device function

I read the guide.

I will try the using atomicOr() in the device function.

Yes, you can use all device-side intrinsics inside device functions as well. They are (at some nesting level) still called from a global kernel which is the only way to execute device code.

Thanks tera!