X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/40616078da72e823931c1fb884949054699ec39d..1bf033cc925aa31693ef5163ea056fde5b75ff1e:/src/smpi/colls/allgatherv/allgatherv-mpich-rdb.cpp diff --git a/src/smpi/colls/allgatherv/allgatherv-mpich-rdb.cpp b/src/smpi/colls/allgatherv/allgatherv-mpich-rdb.cpp index c224fbd7d8..0164319898 100644 --- a/src/smpi/colls/allgatherv/allgatherv-mpich-rdb.cpp +++ b/src/smpi/colls/allgatherv/allgatherv-mpich-rdb.cpp @@ -1,13 +1,19 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2018. 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. */ - /* Short or medium size message and power-of-two no. of processes. Use - * recursive doubling algorithm */ -#include "../colls_private.h" -int smpi_coll_tuned_allgatherv_mpich_rdb ( +/* Short or medium size message and power-of-two no. of processes. Use + * recursive doubling algorithm */ + +#include "../colls_private.hpp" +#include "smpi_status.hpp" +#include + +namespace simgrid{ +namespace smpi{ + +int Coll_allgatherv_mpich_rdb::allgatherv ( void *sendbuf, int sendcount, MPI_Datatype sendtype, @@ -43,7 +49,7 @@ int smpi_coll_tuned_allgatherv_mpich_rdb ( recvtype->extent(&recvtype_true_lb, &recvtype_true_extent); - tmp_buf_rl= (void*)smpi_get_tmp_sendbuffer(total_count*(MAX(recvtype_true_extent,recvtype_extent))); + tmp_buf_rl = (void*)smpi_get_tmp_sendbuffer(total_count * std::max(recvtype_true_extent, recvtype_extent)); /* adjust for potential negative lower bound in datatype */ tmp_buf = (void *)((char*)tmp_buf_rl - recvtype_true_lb); @@ -105,7 +111,7 @@ int smpi_coll_tuned_allgatherv_mpich_rdb ( comm, &status); /* for convenience, recv is posted for a bigger amount than will be sent */ - last_recv_cnt=smpi_mpi_get_count(&status, recvtype); + last_recv_cnt=Status::get_count(&status, recvtype); curr_cnt += last_recv_cnt; } @@ -184,7 +190,7 @@ int smpi_coll_tuned_allgatherv_mpich_rdb ( comm, &status); /* for convenience, recv is posted for a bigger amount than will be sent */ - last_recv_cnt=smpi_mpi_get_count(&status, recvtype); + last_recv_cnt=Status::get_count(&status, recvtype); curr_cnt += last_recv_cnt; } tmp_mask >>= 1; @@ -214,3 +220,6 @@ int smpi_coll_tuned_allgatherv_mpich_rdb ( smpi_free_tmp_buffer(tmp_buf_rl); return MPI_SUCCESS; } + +} +}