From 7bc50b7468e8ccac4960de9608fa76784549e992 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 14 Oct 2016 23:32:55 +0200 Subject: [PATCH] cosmetics: kill some C type instances --- src/simix/smx_network.cpp | 4 ++-- src/surf/HostImpl.cpp | 7 ++----- teshsuite/surf/surf_usage/surf_usage.cpp | 8 ++------ teshsuite/surf/surf_usage2/surf_usage2.cpp | 8 ++------ 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index 70ad4acab0..fcf65a3244 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -542,8 +542,8 @@ static inline void SIMIX_comm_start(smx_activity_t synchro) /* If both the sender and the receiver are already there, start the communication */ if (synchro->state == SIMIX_READY) { - sg_host_t sender = comm->src_proc->host; - sg_host_t receiver = comm->dst_proc->host; + simgrid::s4u::Host* sender = comm->src_proc->host; + simgrid::s4u::Host* receiver = comm->dst_proc->host; XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro, sg_host_get_name(sender), sg_host_get_name(receiver)); diff --git a/src/surf/HostImpl.cpp b/src/surf/HostImpl.cpp index 31763746b6..1185becf37 100644 --- a/src/surf/HostImpl.cpp +++ b/src/surf/HostImpl.cpp @@ -67,11 +67,8 @@ void HostModel::adjustWeightOfDummyCpuActions() } } -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; diff --git a/teshsuite/surf/surf_usage/surf_usage.cpp b/teshsuite/surf/surf_usage/surf_usage.cpp index 6a2fd3f6ca..da0716fa38 100644 --- a/teshsuite/surf/surf_usage/surf_usage.cpp +++ b/teshsuite/surf/surf_usage/surf_usage.cpp @@ -46,12 +46,8 @@ int main(int argc, char **argv) XBT_DEBUG("CPU model: %p", surf_cpu_model_pm); XBT_DEBUG("Network model: %p", surf_network_model); - sg_host_t hostA = sg_host_by_name("Cpu A"); - sg_host_t hostB = sg_host_by_name("Cpu B"); - - /* Let's check that those two processors exist */ - XBT_DEBUG("%s : %p", sg_host_get_name(hostA), hostA); - XBT_DEBUG("%s : %p", sg_host_get_name(hostB), hostB); + simgrid::s4u::Host* hostA = sg_host_by_name("Cpu A"); + simgrid::s4u::Host* hostB = sg_host_by_name("Cpu B"); /* Let's do something on it */ simgrid::surf::Action *actionA = hostA->pimpl_cpu->execution_start(1000.0); diff --git a/teshsuite/surf/surf_usage2/surf_usage2.cpp b/teshsuite/surf/surf_usage2/surf_usage2.cpp index b4467d24fb..1f7e1574e4 100644 --- a/teshsuite/surf/surf_usage2/surf_usage2.cpp +++ b/teshsuite/surf/surf_usage2/surf_usage2.cpp @@ -29,12 +29,8 @@ int main(int argc, char **argv) parse_platform_file(argv[1]); /*********************** HOST ***********************************/ - sg_host_t hostA = sg_host_by_name("Cpu A"); - sg_host_t hostB = sg_host_by_name("Cpu B"); - - /* Let's check that those two processors exist */ - XBT_DEBUG("%s : %p", sg_host_get_name(hostA), hostA); - XBT_DEBUG("%s : %p", sg_host_get_name(hostB), hostB); + simgrid::s4u::Host* hostA = sg_host_by_name("Cpu A"); + simgrid::s4u::Host* hostB = sg_host_by_name("Cpu B"); /* Let's do something on it */ hostA->pimpl_cpu->execution_start(1000.0); -- 2.20.1