Teuchos - Trilinos Tools Package Version of the Day
Public Member Functions
Teuchos::MinLoc< Ordinal, ScalarType, IndexType > Class Template Reference

Teuchos version of MPI_MINLOC. More...

Inheritance diagram for Teuchos::MinLoc< Ordinal, ScalarType, IndexType >:
Teuchos::ValueTypeReductionOp< Ordinal, std::pair< ScalarType, IndexType > > Teuchos::Describable Teuchos::LabeledObject

List of all members.

Public Member Functions

void reduce (const Ordinal count, const std::pair< ScalarType, IndexType > inBuffer[], std::pair< ScalarType, IndexType > inoutBuffer[]) const

Detailed Description

template<class Ordinal, class ScalarType, class IndexType>
class Teuchos::MinLoc< Ordinal, ScalarType, IndexType >

Teuchos version of MPI_MINLOC.

Mark Hoemmen
Template Parameters:
OrdinalThe template parameter of Comm.
PacketA type with value semantics; the type on which to reduce.

MPI_MINLOC is a standard reduction operator provided by the MPI standard. According to the standard, MPI_MINLOC combines the (value, index) pairs (u,i) and (v,j) into (w,j), where $w = min(u,v)$, and

\[ k = \begin{cases} i & \text{if $u < v$}, \\ \min(i,j) & \text{if $u = v$}, \\ j & \text{if $u > v$}. \\ \end{cases} \]

This class implements the MPI_MINLOC reduction operator for the Teuchos communication wrappers.

Refer to the note in the documentation of MaxLoc that explains how we adjust the above definition to produce well-defined results even if the array contains a NaN.

Definition at line 167 of file Teuchos_TimeMonitor.cpp.

Member Function Documentation

template<class Ordinal , class ScalarType , class IndexType >
void Teuchos::MinLoc< Ordinal, ScalarType, IndexType >::reduce ( const Ordinal  count,
const std::pair< ScalarType, IndexType >  inBuffer[],
std::pair< ScalarType, IndexType >  inoutBuffer[] 
) const [virtual]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines