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);