X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/40616078da72e823931c1fb884949054699ec39d..1fc042e8bc9c51f9267fa1936deaebe59ae01ee7:/src/smpi/colls/bcast/bcast-arrival-scatter.cpp diff --git a/src/smpi/colls/bcast/bcast-arrival-scatter.cpp b/src/smpi/colls/bcast/bcast-arrival-scatter.cpp index 2f0ab213c1..c74408803c 100644 --- a/src/smpi/colls/bcast/bcast-arrival-scatter.cpp +++ b/src/smpi/colls/bcast/bcast-arrival-scatter.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. +/* Copyright (c) 2013-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 "../colls_private.hpp" #ifndef BCAST_ARRIVAL_PATTERN_AWARE_HEADER_SIZE #define BCAST_ARRIVAL_PATTERN_AWARE_HEADER_SIZE 128 @@ -13,9 +13,10 @@ #ifndef BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE #define BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE 128 #endif - +namespace simgrid{ +namespace smpi{ /* Non-topology-specific pipelined linear-bcast function */ -int smpi_coll_tuned_bcast_arrival_scatter(void *buf, int count, +int Coll_bcast_arrival_scatter::bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm) { @@ -59,8 +60,8 @@ int smpi_coll_tuned_bcast_arrival_scatter(void *buf, int count, /* message too small */ if (count < size) { XBT_WARN("MPI_bcast_arrival_scatter use default MPI_bcast."); - smpi_mpi_bcast(buf, count, datatype, root, comm); - return MPI_SUCCESS; + Colls::bcast(buf, count, datatype, root, comm); + return MPI_SUCCESS; } @@ -192,7 +193,7 @@ int smpi_coll_tuned_bcast_arrival_scatter(void *buf, int count, 0, tag, comm, &status); /* at this point all nodes in this set perform all-gather operation */ - + to = (myordering == (total_nodes - 1)) ? header_buf[0] : header_buf[myordering + 1]; from = (myordering == 0) ? header_buf[total_nodes - 1] : header_buf[myordering - 1]; @@ -231,3 +232,6 @@ int smpi_coll_tuned_bcast_arrival_scatter(void *buf, int count, return MPI_SUCCESS; } + +} +}