Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / smpi / colls / allgather / allgather-spreading-simple.cpp
index a1f55ca..d5c59b0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2019. The SimGrid Team.
+/* Copyright (c) 2013-2023. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -64,19 +64,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *         order of communications for node i is i -> i + 1, i -> i + 2, ...,
  *         i -> (i + p -1) % P.
  *
- * Auther: Ahmad Faraj
+ * Author: Ahmad Faraj
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int
-Coll_allgather_spreading_simple::allgather(const void *send_buff, int send_count,
-                                           MPI_Datatype send_type,
-                                           void *recv_buff, int recv_count,
-                                           MPI_Datatype recv_type,
-                                           MPI_Comm comm)
+allgather__spreading_simple(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_Aint extent;
   int i, src, dst, rank, num_procs, num_reqs;
@@ -89,7 +87,7 @@ Coll_allgather_spreading_simple::allgather(const void *send_buff, int send_count
   extent = send_type->get_extent();
 
   num_reqs = (2 * num_procs) - 2;
-  MPI_Request* reqs    = new MPI_Request[num_reqs];
+  auto* reqs           = new MPI_Request[num_reqs];
   MPI_Request* req_ptr = reqs;
   Request::sendrecv(send_buff, send_count, send_type, rank, tag,
                (char *) recv_buff + rank * recv_count * extent, recv_count,
@@ -116,5 +114,4 @@ Coll_allgather_spreading_simple::allgather(const void *send_buff, int send_count
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi