are the operations on shared memory atomic?
For example: If I have a variable sum=0 in shared memory
and every thread adds 1 to it.
Is it guaranteed, that, for a thread block,
at the end, sum has the value of #numberofthreads?
If no, are there any atomic functions for shared mem, as for global memory?