The functions in this section are of importance to library implementors who may want to implement special reduction patterns that are otherwise not easily covered by the standard MPI operations.
The following function applies a reduction operator to local arguments.
MPI_REDUCE_LOCAL( inbuf, inoutbuf, count, datatype, op) | |
IN inbuf | input buffer (choice) |
INOUT inoutbuf | combined input and output buffer (choice) |
IN count | number of elements in inbuf and inoutbuf buffers (non-negative integer) |
IN datatype | data type of elements of inbuf and inoutbuf buffers (handle) |
IN op | operation (handle) |
int MPI_Reduce_local(void* inbuf, void* inoutbuf, int count, MPI_Datatype datatype, MPI_Op op)
MPI_REDUCE_LOCAL(INBUF, INOUBUF, COUNT, DATATYPE, OP, IERROR)
<type> INBUF(*), INOUTBUF(*)
INTEGER COUNT, DATATYPE, OP, IERROR
{ void MPI::Op::Reduce_local(const void* inbuf, void* inoutbuf, int count, const MPI::Datatype& datatype) const (binding deprecated, see Section Deprecated since MPI-2.2
) }
The function applies the operation given by op element-wise to the elements of
inbuf and inoutbuf with the result stored element-wise in inoutbuf,
as explained for user-defined operations in Section User-Defined Reduction Operations
.
Both inbuf and inoutbuf (input as well as result) have the same number
of elements given by count and the same datatype given by datatype.
The MPI_IN_PLACE option is not allowed.
Reduction operations can be queried for their commutativity.
int MPI_Op_commutative(MPI_Op op, int *commute)
MPI_OP_COMMUTATIVE(OP, COMMUTE, IERROR)
{ bool MPI::Op::Is_commutative() const (binding deprecated, see Section Deprecated since MPI-2.2
) }
MPI_OP_COMMUTATIVE( op, commute) IN op operation (handle) OUT commute true if op is commutative, false otherwise (logical)
LOGICAL COMMUTE
INTEGER OP, IERROR
Up: Global Reduction Operations
Next: Reduce-Scatter
Previous: All-Reduce
Return to MPI-2.2 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-2.2 of September 4, 2009
HTML Generated on September 10, 2009