From 7070d9f8e8eff697777864edba7912a6bc4474fa Mon Sep 17 00:00:00 2001 From: Irina Demeshko Date: Thu, 9 Nov 2023 10:59:28 -0800 Subject: [PATCH] Update src/cunumeric/unary/scalar_unary_red_template.inl Co-authored-by: Jacob Faibussowitsch --- src/cunumeric/unary/scalar_unary_red_template.inl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;