delete pimpl_;
if (pimpl_netpoint != nullptr) // not removed yet by a children class
- simgrid::s4u::Engine::instance()->netcardUnregister(pimpl_netpoint);
+ simgrid::s4u::Engine::instance()->netpointUnregister(pimpl_netpoint);
delete pimpl_cpu;
delete mounts;
}
* by calling each "get_route" function in each routing component.
*/
void Host::routeTo(Host* dest, std::vector<Link*>* links, double* latency)
+{
+ std::vector<surf::LinkImpl*> linkImpls;
+ this->routeTo(dest, &linkImpls, latency);
+ for (surf::LinkImpl* l : linkImpls)
+ links->push_back(&l->piface_);
+}
+/** @brief Just like Host::routeTo, but filling an array of link implementations */
+void Host::routeTo(Host* dest, std::vector<surf::LinkImpl*>* links, double* latency)
{
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(pimpl_netpoint, dest->pimpl_netpoint, links, latency);
if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
/** @brief Set the pstate at which the host should run */
void Host::setPstate(int pstate_index)
{
- simgrid::simix::kernelImmediate(std::bind(
- &simgrid::surf::Cpu::setPState, pimpl_cpu, pstate_index
- ));
+ simgrid::simix::kernelImmediate([&](){
+ this->pimpl_cpu->setPState(pstate_index);
+ });
}
/** @brief Retrieve the pstate at which the host is currently running */
int Host::pstate()
{
- return pimpl_cpu->getPState();
+ return this->pimpl_cpu->getPState();
}
/**