X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/88fad0aaff9eb463f048bfdfe4ad6218aba44ddb..6042678d235eeddfa0b7120c17c7fb4362881a88:/src/surf/HostImpl.cpp diff --git a/src/surf/HostImpl.cpp b/src/surf/HostImpl.cpp index 889b934c5e..f4c07b3239 100644 --- a/src/surf/HostImpl.cpp +++ b/src/surf/HostImpl.cpp @@ -24,12 +24,12 @@ namespace surf { /* Each VM has a dummy CPU action on the PM layer. This CPU action works as the constraint (capacity) of the VM in the * PM layer. If the VM does not have any active task, the dummy CPU action must be deactivated, so that the VM does not * get any CPU share in the PM layer. */ -void HostModel::ignoreEmptyVmInPmLMM() +void HostModel::ignore_empty_vm_in_pm_LMM() { /* iterate for all virtual machines */ for (s4u::VirtualMachine* const& ws_vm : vm::VirtualMachineImpl::allVms_) { Cpu* cpu = ws_vm->pimpl_cpu; - int active_tasks = cpu->constraint()->get_variable_amount(); + int active_tasks = cpu->get_constraint()->get_variable_amount(); /* The impact of the VM over its PM is the min between its vCPU amount and the amount of tasks it contains */ int impact = std::min(active_tasks, ws_vm->getImpl()->coreAmount()); @@ -51,8 +51,8 @@ static inline double has_cost(double* array, int pos) return -1.0; } -kernel::resource::Action* HostModel::executeParallelTask(int host_nb, s4u::Host** host_list, double* flops_amount, - double* bytes_amount, double rate) +kernel::resource::Action* HostModel::execute_parallel(int host_nb, s4u::Host** host_list, double* flops_amount, + double* bytes_amount, double rate) { kernel::resource::Action* action = nullptr; if ((host_nb == 1) && (has_cost(bytes_amount, 0) <= 0)) { @@ -101,11 +101,13 @@ HostImpl::HostImpl(s4u::Host* host) : piface_(host) piface_->pimpl_ = this; } -void HostImpl::getAttachedStorageList(std::vector* storages) +std::vector HostImpl::get_attached_storages() { + std::vector storages; for (auto const& s : storage_) - if (s.second->getHost() == piface_->getCname()) - storages->push_back(s.second->piface_.getCname()); + if (s.second->getHost() == piface_->get_cname()) + storages.push_back(s.second->piface_.get_cname()); + return storages; } }