OP2/PyOP2 — pull request #94 by wence- (2012-10-25 13:42:03+00:00)
Title: Bug fix for cuda parloops with WRITE or RW indirect Dats

We need to __syncthreads after the loop over set elements before
copying back from shared to global memory, since the thread (j)
reading from shared memory at index "i" may not be the same one (k)
that wrote to index "i" in the element loop. If the two threads are
not in the same warp, then the write from shared to global on thread j
may come before the write to shared memory from thread k.