-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
*
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
+#include <algorithm>
-int smpi_coll_tuned_allreduce_mvapich2_rs(void *sendbuf,
+namespace simgrid{
+namespace smpi{
+int Coll_allreduce_mvapich2_rs::allreduce(void *sendbuf,
void *recvbuf,
int count,
MPI_Datatype datatype,
datatype->extent(&true_lb, &true_extent);
extent = datatype->get_extent();
- tmp_buf_free= smpi_get_tmp_recvbuffer(count * (MAX(extent, true_extent)));
+ tmp_buf_free = smpi_get_tmp_recvbuffer(count * std::max(extent, true_extent));
/* adjust for potential negative lower bound in datatype */
tmp_buf = (void *) ((char *) tmp_buf_free - true_lb);
return (mpi_errno);
}
+
+}
+}