What does the OpenCl function atomic_inc do ?

722 views

[https://www.khronos.org/registry/OpenCL/sdk/1.1/docs/man/xhtml/atomic_inc.html](https://www.khronos.org/registry/OpenCL/sdk/1.1/docs/man/xhtml/atomic_inc.html)

I have read lots but am having trouble making this crayola for myself.

In: Technology

Anonymous 0 Comments

It atomically increments a 32 bit value and stores it in the same location in memory. You’d want to atomically increment if you have multiple threads reading and writing to the same location. This makes sure that only one thread will increment at a time.