32 #ifndef PstreamReduceOps_H 33 #define PstreamReduceOps_H 47 template<
class T,
class BinaryOp>
59 Pout<<
"** reducing:" << Value <<
" with comm:" << comm
69 template<
class T,
class BinaryOp>
90 template<
class T,
class BinaryOp>
144 template<
class T,
class BinaryOp>
static void printStack(Ostream &)
Helper function to print a stack.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static int nProcsSimpleSum
Number of processors at which the sum algorithm changes from linear.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Combination-Reduction operation for a parallel run.
static int & msgType()
Message tag of standard messages.
static label worldComm
Default communicator (all processors)
static const List< commsStruct > & linearCommunication(const label communicator=0)
Communication schedule for linear all-to-master (proc 0)
void sumReduce(T &Value, label &Count, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
static const List< commsStruct > & treeCommunication(const label communicator=0)
Communication schedule for tree all-to-master (proc 0)
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static label nProcs(const label communicator=0)
Number of processes in parallel run.
prefixOSstream Pout(cout, "Pout")
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
static void gather(const List< commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Gather data. Apply bop to combine Value.