Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: kill some C type instances
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 14 Oct 2016 21:32:55 +0000 (23:32 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 14 Oct 2016 21:44:38 +0000 (23:44 +0200)
src/simix/smx_network.cpp
src/surf/HostImpl.cpp
teshsuite/surf/surf_usage/surf_usage.cpp
teshsuite/surf/surf_usage2/surf_usage2.cpp

index 70ad4ac..fcf65a3 100644 (file)
@@ -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));
 
index 3176374..1185bec 100644 (file)
@@ -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;
index 6a2fd3f..da0716f 100644 (file)
@@ -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);
index b4467d2..1f7e157 100644 (file)
@@ -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);