Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use/unuse -> ref/unref
[simgrid.git] / src / smpi / colls / alltoallv-bruck.cpp
index d7d0c37..3be1b0b 100644 (file)
@@ -26,15 +26,15 @@ int smpi_coll_tuned_alltoallv_bruck(void *sendbuf, int *sendcounts, int *senddis
   MPI_Request *requests;
 
   // FIXME: check implementation
-  rank = smpi_comm_rank(comm);
-  size = smpi_comm_size(comm);
+  rank = comm->rank();
+  size = comm->size();
   XBT_DEBUG("<%d> algorithm alltoall_bruck() called.", rank);
 
-  smpi_datatype_extent(sendtype, &lb, &sendext);
-  smpi_datatype_extent(recvtype, &lb, &recvext);
+  sendtype->extent(&lb, &sendext);
+  recvtype->extent(&lb, &recvext);
   /* Local copy from self */
   err =
-      smpi_datatype_copy((char *)sendbuf + senddisps[rank] * sendext,
+      Datatype::copy((char *)sendbuf + senddisps[rank] * sendext,
                          sendcounts[rank], sendtype,
                          (char *)recvbuf + recvdisps[rank] * recvext,
                          recvcounts[rank], recvtype);
@@ -63,7 +63,7 @@ int smpi_coll_tuned_alltoallv_bruck(void *sendbuf, int *sendcounts, int *senddis
                 continue;
               }
 
-              requests[count]=smpi_mpi_irecv((char *)recvbuf + recvdisps[dst] * recvext, recvcounts[dst],
+              requests[count]=Request::irecv((char *)recvbuf + recvdisps[dst] * recvext, recvcounts[dst],
                                   recvtype, dst, system_tag, comm );
               count++;
             }
@@ -75,14 +75,14 @@ int smpi_coll_tuned_alltoallv_bruck(void *sendbuf, int *sendcounts, int *senddis
                        rank, i, sendcounts[dst]);
                 continue;
               }
-              requests[count]=smpi_mpi_isend((char *)sendbuf + senddisps[dst] * sendext, sendcounts[dst],
+              requests[count]=Request::isend((char *)sendbuf + senddisps[dst] * sendext, sendcounts[dst],
                                   sendtype, dst, system_tag, comm);
               count++;
             }
             /* Wait for them all. */
             //smpi_mpi_startall(count, requests);
             XBT_DEBUG("<%d> wait for %d requests", rank, count);
-            smpi_mpi_waitall(count, requests, MPI_STATUSES_IGNORE);
+            Request::waitall(count, requests, MPI_STATUSES_IGNORE);
             xbt_free(requests);
 
           }