Reduce.h File Reference

Detailed Description

#include "BufferDataTypeExtensions.h"
#include "core/Abort.h"
#include "core/DataTypes.h"
#include "core/debug/Debug.h"
#include "core/mpi/MPIManager.h"
#include "core/mpi/MPIWrapper.h"
#include <type_traits>
#include <vector>

Namespaces

 walberla
 Storage for detected contacts which can be used to perform actions for all contacts, e.g.
 
 walberla::mpi
 

Enumerations

enum  walberla::mpi::Operation {
  walberla::mpi::MIN, walberla::mpi::MAX, walberla::mpi::SUM, walberla::mpi::PRODUCT,
  walberla::mpi::LOGICAL_AND, walberla::mpi::BITWISE_AND, walberla::mpi::LOGICAL_OR, walberla::mpi::BITWISE_OR,
  walberla::mpi::LOGICAL_XOR, walberla::mpi::BITWISE_XOR
}
 

Functions

MPI_Op walberla::mpi::toMPI_Op (Operation operation)
 
template<typename T >
void walberla::mpi::reduceInplace (T &value, Operation operation, int recvRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a value over all processes in-place. More...
 
void walberla::mpi::reduceInplace (bool &value, Operation operation, int recvRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a boolean value over all processes in-place. More...
 
template<typename T >
walberla::mpi::reduce (const T value, Operation operation, int recvRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a value over all processes. More...
 
bool walberla::mpi::reduce (const bool value, Operation operation, int recvRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a boolean value over all processes. More...
 
template<typename T >
void walberla::mpi::reduceInplace (std::vector< T > &values, Operation operation, int recvRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces values in a std::vector<T> over all processes in-place. More...
 
void walberla::mpi::reduceInplace (std::vector< bool > &values, Operation operation, int recvRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces boolean values in a std::vector<bool> over all processes in-place. More...
 
template<typename T >
walberla::mpi::allReduce (const T &value, Operation operation, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a value over all processes. More...
 
bool walberla::mpi::allReduce (const bool value, Operation operation, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a boolean value over all processes. More...
 
template<typename T >
void walberla::mpi::allReduceInplace (T &value, Operation operation, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a value over all processes in-place. More...
 
void walberla::mpi::allReduceInplace (bool &value, Operation operation, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces a boolean value over all processes in-place. More...
 
template<typename T >
void walberla::mpi::allReduceInplace (std::vector< T > &values, Operation operation, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces values in a std::vector<T> over all processes in-place. More...
 
void walberla::mpi::allReduceInplace (std::vector< bool > &bools, Operation operation, MPI_Comm comm=MPI_COMM_WORLD)
 Reduces values in a std::vector<bool> over all processes in-place. More...