From d435631e39b10940c6bce5453512820a4c505b59 Mon Sep 17 00:00:00 2001 From: Irina Demeshko Date: Sat, 2 Dec 2023 20:59:17 -0800 Subject: [PATCH] Update src/cunumeric/index/select_template.inl Co-authored-by: Manolis Papadakis --- src/cunumeric/index/select_template.inl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cunumeric/index/select_template.inl b/src/cunumeric/index/select_template.inl index c6f71d4bd..1f6717fde 100644 --- a/src/cunumeric/index/select_template.inl +++ b/src/cunumeric/index/select_template.inl @@ -61,7 +61,8 @@ struct SelectImpl { } std::vector> choicelist; - for (int i = args.inputs.size() / 2; i < args.inputs.size(); i++) { + choicelist.reserve(args.inputs.size() / 2); + for (int32_t i = args.inputs.size() / 2; i < args.inputs.size(); i++) { auto rect_c = args.inputs[i].shape(); #ifdef DEBUG_CUNUMERIC assert(rect_c == out_rect);