"Concurrency limit overflow!");
}
-System* System::build(const std::string& solver_name, bool selective_update)
+System* System::build(std::string_view solver_name, bool selective_update)
{
System* system = nullptr;
if (solver_name == "bmf") {
#include <cmath>
#include <limits>
#include <memory>
+#include <string_view>
#include <vector>
namespace simgrid::kernel::lmm {
* @param selective_update Enables lazy updates
* @return pointer to System instance
*/
- static System* build(const std::string& solver_name, bool selective_update);
+ static System* build(std::string_view solver_name, bool selective_update);
/** @brief Validates solver configuration */
static void validate_solver(const std::string& solver_name);
DiskModel::DiskModel(const std::string& name) : Model(name)
{
- set_maxmin_system(lmm::System::build(cfg_disk_solver, true /* selective update */));
+ set_maxmin_system(lmm::System::build(cfg_disk_solver.get(), true /* selective update */));
}
/************
select = true;
}
- set_maxmin_system(lmm::System::build(cfg_cpu_solver, select));
+ set_maxmin_system(lmm::System::build(cfg_cpu_solver.get(), select));
}
CpuImpl* CpuCas01Model::create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate)
select = true;
}
- set_maxmin_system(lmm::System::build(cfg_network_solver, select));
+ set_maxmin_system(lmm::System::build(cfg_network_solver.get(), select));
loopback_.reset(create_link("__loopback__", {config::get_value<double>("network/loopback-bw")}));
loopback_->set_sharing_policy(s4u::Link::SharingPolicy::FATPIPE, {});
XBT_CINFO(xbt_cfg, "Switching to the L07 model to handle parallel tasks.");
xbt_assert(cfg_ptask_solver != "maxmin", "Invalid configuration. Cannot use maxmin solver with parallel tasks.");
- auto* system = simgrid::kernel::lmm::System::build(cfg_ptask_solver, true /* selective update */);
+ auto* system = simgrid::kernel::lmm::System::build(cfg_ptask_solver.get(), true /* selective update */);
auto host_model = std::make_shared<simgrid::kernel::resource::HostL07Model>("Host_Ptask", system);
auto* engine = simgrid::kernel::EngineImpl::get_instance();
engine->add_model(host_model);