Skip to content

Commit

Permalink
fixing bug in cuda code
Browse files Browse the repository at this point in the history
  • Loading branch information
ipdemes committed Nov 17, 2023
1 parent 2bd62eb commit f504f05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cunumeric/unary/unary_red.cu
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ static __device__ __forceinline__ Point<DIM> local_reduce(LHS& result,
if (!domain.contains(point)) return point;

bool mask = true;
if constexpr (HAS_WHERE) mask = where[point];
while (point[collapsed_dim] <= domain.hi[collapsed_dim]) {
if constexpr (HAS_WHERE) mask = where[point];
if (mask) {
LHS value = OP::convert(point, collapsed_dim, identity, in[point]);
REDOP::template fold<true>(result, value);
Expand Down

0 comments on commit f504f05

Please sign in to comment.