/* selector for collective algorithms based on mpich decision logic */
-/* Copyright (c) 2009-2019. The SimGrid Team.
+/* Copyright (c) 2009-2022. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "colls_private.hpp"
+#include <memory>
+
/* This is the default implementation of allreduce. The algorithm is:
Algorithm: MPI_Allreduce
block_dsize = dsize * count;
/*MPICH uses SMP algorithms for all commutative ops now*/
- if(!comm->is_smp_comm()){
+ if (not comm->is_smp_comm()) {
if(comm->get_leaders_comm()==MPI_COMM_NULL){
comm->init_smp();
}
//int segsize = 0;
size_t message_size, dsize;
- if(!comm->is_smp_comm()){
+ if (not comm->is_smp_comm()) {
if(comm->get_leaders_comm()==MPI_COMM_NULL){
comm->init_smp();
}
int communicator_size=0;
size_t message_size, dsize;
- if(!comm->is_smp_comm()){
+ if (not comm->is_smp_comm()) {
if(comm->get_leaders_comm()==MPI_COMM_NULL){
comm->init_smp();
}
{
std::unique_ptr<unsigned char[]> tmp_buf;
if(comm->rank()!=root){
- tmp_buf.reset(new unsigned char[rcount * rdtype->get_extent()]);
+ tmp_buf = std::make_unique<unsigned char[]>(rcount * rdtype->get_extent());
sbuf = tmp_buf.get();
scount = rcount;
sdtype = rdtype;