/*********
* Model *
*********/
-HostImpl *HostModel::createHost(const char *name, kernel::routing::NetCard *netElm, Cpu *cpu){
- xbt_dynar_t storageList = (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL);
-
+HostImpl* HostModel::createHost(const char* name, Cpu* cpu, kernel::routing::NetCard* netcard, xbt_dynar_t storageList)
+{
HostImpl *host = new simgrid::surf::HostImpl(surf_host_model, name, storageList, cpu);
+ xbt_lib_set(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL, (void*)storageList);
+
XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->storage_));
return host;
}
}
}
-Action *HostModel::executeParallelTask(int host_nb,
- sg_host_t *host_list,
- double *flops_amount,
- double *bytes_amount,
- double rate)
+Action* HostModel::executeParallelTask(int host_nb, simgrid::s4u::Host** host_list, double* flops_amount,
+ double* bytes_amount, double rate)
{
#define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
Action *action =nullptr;