43 #ifndef RTOPPACK_SPMD_APPLY_OP_DECL_HPP
44 #define RTOPPACK_SPMD_APPLY_OP_DECL_HPP
46 #include "RTOpPack_RTOpT.hpp"
47 #include "Teuchos_Serializer.hpp"
48 #include "Teuchos_ReductionOp.hpp"
51 namespace Teuchos {
template<
typename Ordinal>
class Comm; }
55 #define RTOPPACK_ENABLE_SHOW_DUMP
59 # define RTOPPACK_ENABLE_SHOW_DUMP
66 #ifdef RTOPPACK_ENABLE_SHOW_DUMP
68 #endif // RTOPPACK_ENABLE_SHOW_DUMP
76 template<
class PrimitiveScalar>
88 template<
class Scalar>
90 const RTOpT<Scalar> &op,
94 const ReductTarget &reduct_obj,
103 template<
class Scalar>
105 const RTOpT<Scalar> &op,
109 const char reduct_obj_ext[],
110 ReductTarget *reduct_obj
118 template<
class Scalar>
137 Teuchos::RCP<ReductTarget>
createObj()
const;
141 ,
const char charBuffer[]
147 Teuchos::RCP<const RTOpT<Scalar> >
op_;
162 template<
class Scalar>
164 :
public Teuchos::ReferenceTypeReductionOp<Teuchos_Ordinal,ReductTarget>
183 Teuchos::RCP<const RTOpT<Scalar> >
op_;
197 template<
class Scalar>
214 template<
class Scalar>
220 ,
const int num_targ_vecs
233 template<
class Scalar>
238 ,
const int num_multi_vecs
240 ,
const int num_targ_multi_vecs
253 template<
class Scalar>
260 ,
const int num_targ_vecs
269 #endif // RTOPPACK_SPMD_APPLY_OP_DECL_HPP
int serializedSize(int num_values, int num_indexes, int num_chars)
Return the size in bytes of an external representation of a ReductTarget object.
ReductTargetReductionOp< Scalar > & operator=(const ReductTargetReductionOp< Scalar > &)
void SPMD_all_reduce(const Teuchos::Comm< index_type > *comm, const RTOpT< Scalar > &op, const int num_cols, const ReductTarget *const i_reduct_objs[], ReductTarget *const reduct_objs[])
Reduce a set of reduction objects.
Teuchos::RCP< ReductTarget > createObj() const
Class for a changeable sub-vector.
void serialize(const index_type count, const ReductTarget *const reduct_objs[], const index_type bytes, char charBuffer[]) const
Teuchos_Ordinal index_type
ReductionOp subclass for ReductTarget objects.
bool show_spmd_apply_op_dump
void serialize(const RTOpT< Scalar > &op, Ordinal num_values, Ordinal num_indexes, Ordinal num_chars, const ReductTarget &reduct_obj, char reduct_obj_ext[])
Serialize a ReductTarget object.
Class for a non-changeable sub-vector.
void deserialize(const RTOpT< Scalar > &op, int num_values, int num_indexes, int num_chars, const char reduct_obj_ext[], ReductTarget *reduct_obj)
Deserialize a ReductTarget object.
Serializer subclass for ReductTarget objects.
Templated interface to vector reduction/transformation operators {abstract}.
index_type getBufferSize(const index_type count) const
Class for a changeable sub-vector.
void deserialize(const index_type bytes, const char charBuffer[], const index_type count, ReductTarget *const reduct_objs[]) const
Abstract base class for all reduction objects.
ReductTargetSerializer & operator=(const ReductTargetSerializer &)
Class for a non-changeable sub-multi-vector (submatrix).
Teuchos::RCP< const RTOpT< Scalar > > op_
ReductTargetReductionOp()
Teuchos::RCP< const RTOpT< Scalar > > op_
void SPMD_apply_op(const Teuchos::Comm< index_type > *comm, const RTOpT< Scalar > &op, const int num_vecs, const ConstSubVectorView< Scalar > sub_vecs[], const int num_targ_vecs, const SubVectorView< Scalar > targ_sub_vecs[], ReductTarget *reduct_obj)
Apply an RTOp in SMPD mode to a set of vectors with contiguous storage per process.
void reduce(const Ordinal count, const ReductTarget *const inBuffer[], ReductTarget *const inoutBuffer[]) const