diff --git a/src/cunumeric/unary/scalar_unary_red_template.inl b/src/cunumeric/unary/scalar_unary_red_template.inl index 251d5ae3f..b1b3a6729 100644 --- a/src/cunumeric/unary/scalar_unary_red_template.inl +++ b/src/cunumeric/unary/scalar_unary_red_template.inl @@ -264,8 +264,9 @@ static void scalar_unary_red_template(TaskContext& context) bool has_where = scalars[2].value(); size_t start_idx = has_where ? 2 : 1; std::vector extra_args; + extra_args.reserve(inputs.size()); for (size_t idx = start_idx; idx < inputs.size(); ++idx) - extra_args.push_back(std::move(inputs[idx])); + extra_args.emplace_back(std::move(inputs[idx])); // If the RHS was a scalar, use (1,) as the shape if (shape.dim == 0) { shape.dim = 1;