Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Properly register the waiter in wait_any_for(), so that it gets handled on suspend...
[simgrid.git] / src / smpi / colls / alltoall / alltoall-2dmesh.cpp
index 918a242b89a4588562bb338f8c03278627047c01..7a82ffe00e5cffb421374fcb6c0963259295b6a6 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
@@ -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