26 #ifndef PstreamReduceOps_H 27 #define PstreamReduceOps_H 41 template<
class T,
class BinaryOp>
53 Pout<<
"** reducing:" << Value <<
" with comm:" << comm
63 template<
class T,
class BinaryOp>
84 template<
class T,
class BinaryOp>
138 template<
class T,
class BinaryOp>
150 "reduce(T&, const BinaryOp&, const int, const label, label&" void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
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 label nProcs(const label communicator=0)
Number of processes in parallel run.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const List< commsStruct > & linearCommunication(const label communicator=0)
Communication schedule for linear 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.
static int & msgType()
Message tag of standard messages.
static const List< commsStruct > & treeCommunication(const label communicator=0)
Communication schedule for tree all-to-master (proc 0)
Combination-Reduction operation for a parallel run.
#define notImplemented(functionName)
Issue a FatalErrorIn for a function not currently implemented.
static label worldComm
Default communicator (all processors)
void sumReduce(T &Value, label &Count, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
prefixOSstream Pout(cout,"Pout")
static int nProcsSimpleSum
Number of processors at which the sum algorithm changes from linear.