PstreamReduceOps.H File Reference

Inter-processor communication reduction functions. More...

Include dependency graph for PstreamReduceOps.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Functions

template<class T , class BinaryOp >
void reduce (T &value, [[maybe_unused]] BinaryOp bop, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Reduce inplace (cf. MPI Allreduce) More...
 
template<class T , class BinaryOp >
void reduce (T values[], const int count, [[maybe_unused]] BinaryOp bop, [[maybe_unused]] const int tag, const int communicator=UPstream::worldComm)
 Reduce inplace (cf. MPI Allreduce) multiple values (same size on all ranks!) More...
 
template<class T , unsigned N, class BinaryOp >
void reduce (FixedList< T, N > &values, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Reduce multiple values. More...
 
template<class T , class BinaryOp >
void reduce (T values[], int count, [[maybe_unused]] BinaryOp bop, [[maybe_unused]] const int tag, const int communicator, UPstream::Request &req)
 Non-blocking reduce inplace (cf. MPI Iallreduce) multiple values. Sets request. More...
 
template<class T , class BinaryOp >
void reduce (T &value, BinaryOp bop, const int tag, const int communicator, UPstream::Request &req)
 Non-blocking reduce inplace (cf. MPI Iallreduce) single value. Sets request. More...
 
void reduce (bool &value, Foam::andOp< bool >, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Logical (and) inplace reduction. Uses UPstream::reduceAnd. More...
 
void reduce (bool &value, Foam::orOp< bool >, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Logical (or) inplace reduction. Uses UPstream::reduceOr. More...
 
template<class T >
void reduce (MinMax< T > &value, Foam::sumOp< MinMax< T >>, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Reduce inplace (Allreduce) for MinMax with sum/plus semantics, which corresponds to op_min on the min() value and op_max on the max() value. More...
 
template<class T >
void reduce (MinMax< T > &value, Foam::plusOp< MinMax< T >>, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Reduce inplace (Allreduce) for MinMax with sum/plus semantics. More...
 
template<class T , class CountType = int>
void sumReduce (T &value, CountType &count, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Reduce inplace (cf. MPI Allreduce) the sum of value and counter (eg, for averaging) More...
 
template<class T , class BinaryOp >
T returnReduce (const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
 Perform reduction on a copy, using specified binary operation. More...
 
bool returnReduceAnd (const bool value, const int communicator=UPstream::worldComm)
 Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd. More...
 
bool returnReduceOr (const bool value, const int communicator=UPstream::worldComm)
 Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr. More...
 

Detailed Description

Inter-processor communication reduction functions.

Original source file PstreamReduceOps.H

InNamespace Foam

Definition in file PstreamReduceOps.H.