Your example code should not give any errors as was proved by Robert Crovella. I looked at your original code and found a misaligned parenthesis cause by that first “for” loop. Good luck…
0
solved CUDA: Using a global thread index with shared memory won’t work [closed]