Skip to content

Commit

Permalink
Fix Cuda parallel_scan ThreadVectorRange range
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Arndt authored and masterleinad committed Sep 19, 2023
1 parent 4a266d8 commit 4a819b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/Cuda/Kokkos_Cuda_Team.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ parallel_scan(const Impl::ThreadVectorRangeBoundariesStruct<
// exclusive scan -- the final accumulation
// of i's val will be included in the second
// closure call later.
if (i < loop_boundaries.end && threadIdx.x > 0) {
if (i - 1 < loop_boundaries.end && threadIdx.x > 0) {
closure(i - 1, val, false);
}

Expand Down

0 comments on commit 4a819b6

Please sign in to comment.