42 #ifndef TEUCHOS_MPI_REDUCTION_OP_SETTER_HPP
43 #define TEUCHOS_MPI_REDUCTION_OP_SETTER_HPP
70 virtual public Describable {
73 reduce (
void* invec,
void* inoutvec,
74 int* len, MPI_Datatype* datatype)
const = 0;
83 template<
typename OrdinalType>
84 class MpiReductionOp :
public MpiReductionOpBase {
86 MpiReductionOp (
const ValueTypeReductionOp<OrdinalType,char>& reductOp)
87 : reductOp_ (reductOp)
91 reduce (
void* invec,
void* inoutvec,
int* len, MPI_Datatype* datatype)
const
103 MPI_Type_size (*datatype, &sz);
105 reductOp_.reduce ((*len) * sz, reinterpret_cast<char*> (invec),
106 reinterpret_cast<char*> (inoutvec));
110 const ValueTypeReductionOp<OrdinalType, char>& reductOp_;
113 MpiReductionOp (
const MpiReductionOp&);
114 MpiReductionOp& operator= (
const MpiReductionOp&);
125 MPI_Op setMpiReductionOp (
const MpiReductionOpBase& reductOp);
132 #endif // TEUCHOS_MPI_REDUCTION_OP_SETTER_HPP
Teuchos header file which uses auto-configuration information to include necessary C++ headers...
#define TEUCHOSCOMM_LIB_DLL_EXPORT
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call...