Commit 81753737 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed bug caused by missing synchronization in findInteractingBlocks()

parent aa4dad89
...@@ -257,6 +257,7 @@ __device__ void storeInteractionData(unsigned short x, unsigned short* buffer, s ...@@ -257,6 +257,7 @@ __device__ void storeInteractionData(unsigned short x, unsigned short* buffer, s
for (int i = threadIdx.x; i < BUFFER_SIZE; i += blockDim.x) for (int i = threadIdx.x; i < BUFFER_SIZE; i += blockDim.x)
buffer[i] = INVALID; buffer[i] = INVALID;
__syncthreads();
} }
/** /**
......
...@@ -226,6 +226,7 @@ void storeInteractionData(unsigned short x, __local unsigned short* buffer, __lo ...@@ -226,6 +226,7 @@ void storeInteractionData(unsigned short x, __local unsigned short* buffer, __lo
for (int i = get_local_id(0); i < BUFFER_SIZE; i += get_local_size(0)) for (int i = get_local_id(0); i < BUFFER_SIZE; i += get_local_size(0))
buffer[i] = INVALID; buffer[i] = INVALID;
barrier(CLK_LOCAL_MEM_FENCE);
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment