Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use C++ memory operators for smpi buffers.
[simgrid.git] / src / smpi / colls / alltoallv / alltoallv-ompi-basic-linear.cpp
index 2d7a71a..5b646c6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2018. The SimGrid Team.
+/* Copyright (c) 2013-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -17,9 +17,9 @@
 namespace simgrid{
 namespace smpi{
 int
-Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisps,
+Coll_alltoallv_ompi_basic_linear::alltoallv(const void *sbuf, const int *scounts, const int *sdisps,
                                             MPI_Datatype sdtype,
-                                            void *rbuf, int *rcounts, int *rdisps,
+                                            void *rbuf, const int *rcounts, const int *rdisps,
                                             MPI_Datatype rdtype,
                                             MPI_Comm comm)
 {
@@ -56,7 +56,7 @@ Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisp
 
     /* Post all receives first */
     for (i = 0; i < size; ++i) {
-        if (i == rank || 0 == rcounts[i]) {
+        if (i == rank) {
             continue;
         }
 
@@ -72,7 +72,7 @@ Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisp
 
     /* Now post all sends */
     for (i = 0; i < size; ++i) {
-        if (i == rank || 0 == scounts[i]) {
+        if (i == rank) {
             continue;
         }