Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Refactorize the sthread interception of functions
[simgrid.git] / src / smpi / colls / alltoall / alltoall-3dmesh.cpp
index 24f9def3b95844ce654315d3b387e0a32673d72a..17ea7c1e41a8cf3d55df51efbfc966b8456205a4 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
@@ -27,7 +27,7 @@
            y dimension, then in z dimension. Each node then extracts the
            needed data. The communication in all dimension is simple.
 
- * Auther: Ahmad Faraj
+ * Author: Ahmad Faraj
 ****************************************************************************/
 
 static int alltoall_check_is_3dmesh(int num, int *i, int *j, int *k)
@@ -45,12 +45,11 @@ static int alltoall_check_is_3dmesh(int num, int *i, int *j, int *k)
   }
   return 0;
 }
-namespace simgrid{
-namespace smpi{
-int Coll_alltoall_3dmesh::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)
+namespace simgrid::smpi {
+int alltoall__3dmesh(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;
   MPI_Status status;
@@ -83,8 +82,8 @@ int Coll_alltoall_3dmesh::alltoall(const void *send_buff, int send_count,
   unsigned char* tmp_buff1 = smpi_get_tmp_sendbuffer(block_size * num_procs * two_dsize);
   unsigned char* tmp_buff2 = smpi_get_tmp_recvbuffer(block_size * two_dsize);
 
-  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;
 
   recv_offset = (rank % two_dsize) * block_size * num_procs;
@@ -181,5 +180,4 @@ int Coll_alltoall_3dmesh::alltoall(const void *send_buff, int send_count,
   smpi_free_tmp_buffer(tmp_buff2);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi