Skip to content

Commit

Permalink
Merge pull request #619 from stephenswat/fix/cuda_barrier_test
Browse files Browse the repository at this point in the history
Fix bug in CUDA barrier unit test
  • Loading branch information
stephenswat authored Jun 18, 2024
2 parents 69c8db1 + 7191b6c commit d4cad96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/cuda/test_barrier.cu
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,22 @@ __global__ void testBarrierCount(int* out) {

int v;

v = bar.blockOr(false);
v = bar.blockCount(false);
if (threadIdx.x == 0) {
out[0] = v;
}

v = bar.blockOr(true);
v = bar.blockCount(true);
if (threadIdx.x == 0) {
out[1] = v;
}

v = bar.blockOr(threadIdx.x % 2 == 0);
v = bar.blockCount(threadIdx.x % 2 == 0);
if (threadIdx.x == 0) {
out[2] = v;
}

v = bar.blockOr(threadIdx.x < 32);
v = bar.blockCount(threadIdx.x < 32);
if (threadIdx.x == 0) {
out[3] = v;
}
Expand Down

0 comments on commit d4cad96

Please sign in to comment.