I never managed to understand why atomic functions are not supported for other data types… I want support for unsigned char.
Without being a programming expert, I took a look on the code, and I didn’t saw any special commands that explain how they serialize memory writes etc It was very simple.
So, I was thinking whether it is possible to write my own atomic function.
Is this possible? Or I’ll end up with a simple function, without the benefits of an atomic?
Do I have to rebuild the whole CUDA library?
That header file is mostly just a wrapper for the fundamental hardware atomic ops in device 1.1+ GPUs. It’s hard to have the hardware perform atomic float ops because floating point math takes more pipeline cycles and you’d need more logic to “hold” the original memory for more clock ticks in order to get the final addition or whatever updated. Integer math has a shorter pipeline (one tick??).