Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Comm -> C++
[simgrid.git] / src / smpi / colls / allreduce-smp-rsag-rab.cpp
index 1ac827e..64c1729 100644 (file)
@@ -27,20 +27,20 @@ int smpi_coll_tuned_allreduce_smp_rsag_rab(void *sbuf, void *rbuf, int count,
   int tag = COLL_TAG_ALLREDUCE;
   int mask, src, dst;
   MPI_Status status;
-  if(smpi_comm_get_leaders_comm(comm)==MPI_COMM_NULL){
-    smpi_comm_init_smp(comm);
+  if(comm->get_leaders_comm()==MPI_COMM_NULL){
+    comm->init_smp();
   }
   int num_core=1;
-  if (smpi_comm_is_uniform(comm)){
-    num_core = smpi_comm_size(smpi_comm_get_intra_comm(comm));
+  if (comm->is_uniform()){
+    num_core = comm->get_intra_comm()->size();
   }
 
-  comm_size = smpi_comm_size(comm);
+  comm_size = comm->size();
 
   if((comm_size&(comm_size-1)))
     THROWF(arg_error,0, "allreduce smp rsag rab algorithm can't be used with non power of two number of processes ! ");
 
-  rank = smpi_comm_rank(comm);
+  rank = comm->rank();
   MPI_Aint extent;
   extent = smpi_datatype_get_extent(dtype);
   tmp_buf = (void *) smpi_get_tmp_sendbuffer(count * extent);