"vscode:/vscode.git/clone" did not exist on "91691124342d69b108b3195489ccca03b8797b09"
Commit e11ba77d authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed CUDA compilation error on Windows

parent 806c4774
...@@ -9,12 +9,12 @@ __device__ real reduceValue(real value, volatile real* temp) { ...@@ -9,12 +9,12 @@ __device__ real reduceValue(real value, volatile real* temp) {
__syncthreads(); __syncthreads();
temp[thread] = value; temp[thread] = value;
__syncthreads(); __syncthreads();
for (uint step = 1; step < 32; step *= 2) { for (unsigned int step = 1; step < 32; step *= 2) {
if (thread+step < blockDim.x && thread%(2*step) == 0) if (thread+step < blockDim.x && thread%(2*step) == 0)
temp[thread] = temp[thread] + temp[thread+step]; temp[thread] = temp[thread] + temp[thread+step];
SYNC_WARPS SYNC_WARPS
} }
for (uint step = 32; step < blockDim.x; step *= 2) { for (unsigned int step = 32; step < blockDim.x; step *= 2) {
if (thread+step < blockDim.x && thread%(2*step) == 0) if (thread+step < blockDim.x && thread%(2*step) == 0)
temp[thread] = temp[thread] + temp[thread+step]; temp[thread] = temp[thread] + temp[thread+step];
__syncthreads(); __syncthreads();
......
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