From f504f05a95190de88cac5b5927cbf2d5d37c8ff2 Mon Sep 17 00:00:00 2001 From: Irina Demeshko Date: Fri, 17 Nov 2023 13:11:07 -0800 Subject: [PATCH] fixing bug in cuda code --- src/cunumeric/unary/unary_red.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cunumeric/unary/unary_red.cu b/src/cunumeric/unary/unary_red.cu index d6617df71..b5e0e5eb1 100644 --- a/src/cunumeric/unary/unary_red.cu +++ b/src/cunumeric/unary/unary_red.cu @@ -282,8 +282,8 @@ static __device__ __forceinline__ Point 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(result, value);