diff --git a/src/cunumeric/unary/unary_red_template.inl b/src/cunumeric/unary/unary_red_template.inl index 87750e17c..1b92d5a32 100644 --- a/src/cunumeric/unary/unary_red_template.inl +++ b/src/cunumeric/unary/unary_red_template.inl @@ -50,14 +50,12 @@ struct UnaryRedImpl { auto lhs = args.lhs.reduce_accessor(rect); + AccessorRO where; if constexpr (HAS_WHERE) { - auto where = args.where.read_accessor(rect); - UnaryRedImplBody()( - lhs, rhs, where, rect, pitches, args.collapsed_dim, volume); - } else { - UnaryRedImplBody()( - lhs, rhs, AccessorRO(), rect, pitches, args.collapsed_dim, volume); + where = args.where.read_accessor(rect); } + UnaryRedImplBody()( + lhs, rhs, where, rect, pitches, args.collapsed_dim, volume); } template