monolish
0.14.2
MONOlithic LIner equation Solvers for Highly-parallel architecture
src
mpi
allreduce.hpp
Go to the documentation of this file.
1
#include "../internal/monolish_internal.hpp"
2
#include "../internal/mpi/mpi_util.hpp"
3
4
namespace
monolish
{
5
namespace
{
6
template
<
typename
T> T Allreduce_core(T val,
MPI_Op
op,
MPI_Comm
comm) {
7
Logger &logger =
Logger::get_instance
();
8
logger.util_in(
monolish_func
);
9
10
#if defined MONOLISH_USE_MPI
11
MPI_Allreduce(&val, &val, 1, internal::mpi::get_type(val), op, comm);
12
#endif
13
14
logger.util_out();
15
return
val;
16
}
17
}
// namespace
18
}
// namespace monolish
monolish_func
#define monolish_func
Definition:
monolish_logger.hpp:9
monolish
Definition:
monolish_matrix_blas.hpp:10
MPI_Comm
struct ompi_communicator_t * MPI_Comm
Definition:
mpi_dummy.hpp:40
MPI_Op
struct ompi_op_t * MPI_Op
Definition:
mpi_dummy.hpp:46
monolish::Logger::get_instance
static Logger & get_instance()
Definition:
monolish_logger.hpp:42
Generated by
1.8.17