X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/19b3962253112b19308537bc2400de141c119d99..13fb4af932a02ea0bd4293d1e55ac071de326f80:/src/smpi/colls/reduce/reduce-binomial.cpp diff --git a/src/smpi/colls/reduce/reduce-binomial.cpp b/src/smpi/colls/reduce/reduce-binomial.cpp index e7dfd60ce8..7321767499 100644 --- a/src/smpi/colls/reduce/reduce-binomial.cpp +++ b/src/smpi/colls/reduce/reduce-binomial.cpp @@ -31,9 +31,9 @@ int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count, tmp_buf = (void *) smpi_get_tmp_sendbuffer(count * extent); int is_commutative = (op==MPI_OP_NULL || op->is_commutative()); mask = 1; - + int lroot; - if (is_commutative) + if (is_commutative) lroot = root; else lroot = 0; @@ -43,7 +43,7 @@ int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count, /* adjust for potential negative lower bound in datatype */ tmp_buf = (void *)((char*)tmp_buf - true_lb); - + /* If I'm not the root, then my recvbuf may not be valid, therefore I have to allocate a temporary one */ if (rank != root) { @@ -61,7 +61,7 @@ int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count, if (source < comm_size) { source = (source + lroot) % comm_size; Request::recv(tmp_buf, count, datatype, source, tag, comm, &status); - + if (is_commutative) { if(op!=MPI_OP_NULL) op->apply( tmp_buf, recvbuf, &count, datatype); } else { @@ -77,7 +77,7 @@ int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count, mask <<= 1; } - if (!is_commutative && (root != 0)){ + if (not is_commutative && (root != 0)) { if (rank == 0){ Request::send(recvbuf, count, datatype, root,tag, comm); }else if (rank == root){ @@ -86,7 +86,7 @@ int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count, } if (rank != root) { - smpi_free_tmp_buffer(recvbuf); + smpi_free_tmp_buffer(recvbuf); } smpi_free_tmp_buffer(tmp_buf);