say I have a block with 384 threads, and I will use 256 of them to do one task and all the threads to finish up.
[indent]int i = threadIdx.x;
shared int a;
shared int buffer;
if (i < 256)
[indent] (do something to buffer)
if (i < 5)
a[i] = buffer[i*50];[/indent]
after this code, it seems to me that threads 256 to 383 don’t see the changes made to a. They read a to a 0.The code is too long to post, it will be helpful if any one can give a wild guess what could cause this. Thanks.