Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
added doc for wifi ns3
[simgrid.git] / src / smpi / mpi / smpi_group.cpp
index 162b8deb085f66af7a5ed680f9edfbe7687b3bd8..dceefb9c391c43734f6570ae3b14ffdd0049901c 100644 (file)
@@ -14,7 +14,7 @@ MPI_Group MPI_GROUP_EMPTY=&mpi_MPI_GROUP_EMPTY;
 namespace simgrid{
 namespace smpi{
 
-Group::Group(Group* origin)
+Group::Group(const Group* origin)
 {
   if (origin != MPI_GROUP_NULL && origin != MPI_GROUP_EMPTY) {
     size_              = origin->size();
@@ -207,7 +207,7 @@ int Group::excl(int n, const int *ranks, MPI_Group * newgroup){
   int oldsize = size_;
   int newsize = oldsize - n;
   *newgroup = new  Group(newsize);
-  int* to_exclude = new int[size_];
+  auto* to_exclude = new int[size_];
   for (int i     = 0; i < oldsize; i++)
     to_exclude[i]=0;
   for (int i            = 0; i < n; i++)
@@ -322,7 +322,7 @@ MPI_Group Group::f2c(int id) {
     char key[KEY_SIZE];
     return static_cast<MPI_Group>(F2C::f2c_lookup()->at(get_key(key, id)));
   } else {
-    return static_cast<MPI_Group>(MPI_GROUP_NULL);
+    return MPI_GROUP_NULL;
   }
 }