- this->hostList_->reserve(host_nb);
- for (int i = 0; i < host_nb; i++) {
- this->hostList_->push_back(host_list[i]);
- if (flops_amount[i] > 0)
- nb_used_host++;
- }
+ this->hostList_.reserve(host_nb);
+ for (int i = 0; i < host_nb; i++)
+ this->hostList_.push_back(host_list[i]);
+
+ if (flops_amount != nullptr)
+ for (int i = 0; i < host_nb; i++)
+ if (flops_amount[i] > 0)
+ nb_used_host++;