Skip to content

Commit

Permalink
update comment to include final() mention
Browse files Browse the repository at this point in the history
  • Loading branch information
tcclevenger committed Nov 29, 2023
1 parent 4d4a343 commit b00c1e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/Cuda/Kokkos_Cuda_Parallel_Range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ class ParallelReduce<CombinedFunctorReducerType, Kokkos::RangePolicy<Traits...>,
if (CudaTraits::WarpSize < word_count.value) {
__syncthreads();
} else if (word_count.value > 1) {
// Inside cuda_single_inter_block_reduce_scan() above, shared[i] below
// might have been updated by a single thread within a warp without
// synchronization afterwards. Synchronize threads within warp to avoid
// potential racecondition.
// Inside cuda_single_inter_block_reduce_scan() and final() above,
// shared[i] below might have been updated by a single thread within a
// warp without synchronization afterwards. Synchronize threads within
// warp to avoid potential race condition.
__syncwarp(0xffffffff);
}

Expand Down

0 comments on commit b00c1e0

Please sign in to comment.