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

Public GIT Repository
Merge branch 'issue105' into 'master'
[simgrid.git] / src / smpi / colls / alltoall / alltoall-bruck.cpp
index 9c2f5bcd466ae0fbd014cbf312fbae5c7d460b62..a24dc9f6427c8af089ea33dfd8b7274b3fa59deb 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
@@ -21,7 +21,7 @@
 
  * Descrp: Function realizes the alltoall operation using the bruck algorithm.
 
- * Auther: MPICH / modified by Ahmad Faraj
+ * Author: MPICH / modified by Ahmad Faraj
 
  ****************************************************************************/
 
@@ -32,10 +32,10 @@ namespace smpi{
 
 
 int
-Coll_alltoall_bruck::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)
+alltoall__bruck(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 status;
   MPI_Aint extent;
@@ -44,8 +44,6 @@ Coll_alltoall_bruck::alltoall(const void *send_buff, int send_count,
   int i, src, dst, rank, num_procs, count, block, position;
   int pack_size, tag = COLL_TAG_ALLTOALL, pof2 = 1;
 
-
-  char *tmp_buff;
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
 
@@ -54,7 +52,7 @@ Coll_alltoall_bruck::alltoall(const void *send_buff, int send_count,
 
   extent = recv_type->get_extent();
 
-  tmp_buff = (char *) smpi_get_tmp_sendbuffer(num_procs * recv_count * extent);
+  unsigned char* tmp_buff = smpi_get_tmp_sendbuffer(num_procs * recv_count * extent);
   int* disps         = new int[num_procs];
   int* blocks_length = new int[num_procs];