]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/colls/gather/gather-ompi.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce scope for variables.
[simgrid.git] / src / smpi / colls / gather / gather-ompi.cpp
index 3963e23274524f92a316b1d1a0c1820b4e6be8c6..6ee45a8b77541119f78855e6e95f08790f265817 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2020. The SimGrid Team.
+/* Copyright (c) 2013-2022. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -22,8 +22,7 @@
 #include "../coll_tuned_topo.hpp"
 #include "../colls_private.hpp"
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 int gather__ompi_binomial(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
                           MPI_Datatype rdtype, int root, MPI_Comm comm)
@@ -270,7 +269,7 @@ int gather__ompi_linear_sync(const void *sbuf, int scount,
 */
       char* ptmp;
       MPI_Request first_segment_req;
-      MPI_Request* reqs = new (std::nothrow) MPI_Request[size];
+      auto* reqs = new (std::nothrow) MPI_Request[size];
       if (nullptr == reqs) {
         ret  = -1;
         line = __LINE__;
@@ -409,5 +408,4 @@ int gather__ompi_basic_linear(const void* sbuf, int scount, MPI_Datatype sdtype,
     return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi