Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Continuing work on datatypes
[simgrid.git] / src / smpi / colls / allreduce-rab-rdb.cpp
index cf36d06a262fc8b43b553937be7de496071affd9..29d727fcbda95be43e05106dfdfdb67770a23f8d 100644 (file)
@@ -21,10 +21,10 @@ int smpi_coll_tuned_allreduce_rab_rdb(void *sbuff, void *rbuff, int count,
   unsigned int nprocs = comm->size();
   int rank = comm->rank();
 
-  extent = smpi_datatype_get_extent(dtype);
+  extent = dtype->get_extent();
   tmp_buf = (void *) smpi_get_tmp_sendbuffer(count * extent);
 
-  smpi_datatype_copy(sbuff, count, dtype, rbuff, count, dtype);
+  Datatype::copy(sbuff, count, dtype, rbuff, count, dtype);
 
   // find nearest power-of-two less than or equal to comm_size
   pof2 = 1;
@@ -56,7 +56,7 @@ int smpi_coll_tuned_allreduce_rab_rdb(void *sbuff, void *rbuff, int count,
       // do the reduction on received data. since the
       // ordering is right, it doesn't matter whether
       // the operation is commutative or not.
-       if(op!=MPI_OP_NULL) op->apply( tmp_buf, rbuff, &count, &dtype);
+       if(op!=MPI_OP_NULL) op->apply( tmp_buf, rbuff, &count, dtype);
 
       // change the rank 
       newrank = rank / 2;
@@ -126,7 +126,7 @@ int smpi_coll_tuned_allreduce_rab_rdb(void *sbuff, void *rbuff, int count,
       // This algorithm is used only for predefined ops
       // and predefined ops are always commutative.
       if(op!=MPI_OP_NULL) op->apply( (char *) tmp_buf + disps[recv_idx] * extent,
-                        (char *) rbuff + disps[recv_idx] * extent, &recv_cnt, &dtype);
+                        (char *) rbuff + disps[recv_idx] * extent, &recv_cnt, dtype);
 
       // update send_idx for next iteration 
       send_idx = recv_idx;