Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Concatenate nested namespaces (sonar).
[simgrid.git] / src / smpi / colls / alltoall / alltoall-2dmesh.cpp
index 7d9a906c5d9de30dcaa0552328bb18d281327b27..aa63c4157af01df980e8f9b0b88f875c05a3ce4e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2019. 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
@@ -27,7 +27,7 @@
            then in the y dimension. Each node then extracts the needed data.
            The communication in each dimension follows "simple."
 
- * Auther: Ahmad Faraj
+ * Author: Ahmad Faraj
 
 ****************************************************************************/
 static int alltoall_check_is_2dmesh(int num, int *i, int *j)
@@ -52,13 +52,12 @@ static int alltoall_check_is_2dmesh(int num, int *i, int *j)
   }
   return 0;
 }
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
-int Coll_alltoall_2dmesh::alltoall(const void *send_buff, int send_count,
-                                    MPI_Datatype send_type,
-                                    void *recv_buff, int recv_count,
-                                    MPI_Datatype recv_type, MPI_Comm comm)
+int alltoall__2dmesh(const void *send_buff, int send_count,
+                     MPI_Datatype send_type,
+                     void *recv_buff, int recv_count,
+                     MPI_Datatype recv_type, MPI_Comm comm)
 {
   MPI_Status s;
   MPI_Aint extent;
@@ -87,8 +86,8 @@ int Coll_alltoall_2dmesh::alltoall(const void *send_buff, int send_count,
   if (Y > X)
     num_reqs = Y;
 
-  MPI_Status* statuses = new MPI_Status[num_reqs];
-  MPI_Request* reqs    = new MPI_Request[num_reqs];
+  auto* statuses       = new MPI_Status[num_reqs];
+  auto* reqs           = new MPI_Request[num_reqs];
   MPI_Request* req_ptr = reqs;
 
   count = send_count * num_procs;
@@ -171,5 +170,4 @@ int Coll_alltoall_2dmesh::alltoall(const void *send_buff, int send_count,
   smpi_free_tmp_buffer(tmp_buff2);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi