Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
reduce the amount of includes
[simgrid.git] / src / smpi / colls / bcast / bcast-scatter-rdb-allgather.cpp
index 9a94599..1a1fe1a 100644 (file)
@@ -1,4 +1,13 @@
+/* Copyright (c) 2011-2017. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "../colls_private.h"
+#include "src/smpi/smpi_status.hpp"
+
+namespace simgrid{
+namespace smpi{
 
 static int scatter_for_bcast(
     int root,
@@ -55,7 +64,7 @@ static int scatter_for_bcast(
                                          recv_size, MPI_BYTE, src,
                                          COLL_TAG_BCAST, comm, &status);
                 /* query actual size of data received */
-                curr_size=smpi_mpi_get_count(&status, MPI_BYTE);
+                curr_size=Status::get_count(&status, MPI_BYTE);
             }
             break;
         }
@@ -92,6 +101,7 @@ static int scatter_for_bcast(
     return mpi_errno;
 }
 
+
 int
 Coll_bcast_scatter_rdb_allgather::bcast (
     void *buffer, 
@@ -210,7 +220,7 @@ Coll_bcast_scatter_rdb_allgather::bcast (
                                          ((char *)tmp_buf + recv_offset),
                                          (nbytes-recv_offset < 0 ? 0 : nbytes-recv_offset), 
                                          MPI_BYTE, dst, COLL_TAG_BCAST, comm, &status);
-            recv_size=smpi_mpi_get_count(&status, MPI_BYTE);
+            recv_size=Status::get_count(&status, MPI_BYTE);
             curr_size += recv_size;
         }
 
@@ -293,7 +303,7 @@ Coll_bcast_scatter_rdb_allgather::bcast (
                                              comm, &status);
                     /* nprocs_completed is also equal to the no. of processes
                        whose data we don't have */
-                    recv_size=smpi_mpi_get_count(&status, MPI_BYTE);
+                    recv_size=Status::get_count(&status, MPI_BYTE);
                     curr_size += recv_size;
                     /* printf("Rank %d, recv from %d, offset %d, size %d\n", rank, dst, offset, recv_size);
                        fflush(stdout);*/
@@ -329,3 +339,6 @@ fn_exit:
 /*    xbt_free(tmp_buf);*/
     return mpi_errno;
 }
+
+}
+}