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"
55#define RTOPPACK_ENABLE_SHOW_DUMP
59# define RTOPPACK_ENABLE_SHOW_DUMP
81template<
class PrimitiveScalar>
95 const RTOpT<Scalar> &op,
99 const ReductTarget &reduct_obj,
100 char reduct_obj_ext[]
108template<
class Scalar>
110 const RTOpT<Scalar> &op,
114 const char reduct_obj_ext[],
115 ReductTarget *reduct_obj
123template<
class Scalar>
142 Teuchos::RCP<ReductTarget>
createObj()
const;
146 ,
const char charBuffer[]
152 Teuchos::RCP<const RTOpT<Scalar> >
op_;
167template<
class Scalar>
169 :
public Teuchos::ReferenceTypeReductionOp<Teuchos_Ordinal,ReductTarget>
188 Teuchos::RCP<const RTOpT<Scalar> >
op_;
202template<
class Scalar>
219template<
class Scalar>
225 ,
const int num_targ_vecs
238template<
class Scalar>
243 ,
const int num_multi_vecs
245 ,
const int num_targ_multi_vecs
258template<
class Scalar>
265 ,
const int num_targ_vecs
Class for a non-changeable sub-multi-vector (submatrix).
Class for a non-changeable sub-vector.
Templated interface to vector reduction/transformation operators {abstract}.
ReductionOp subclass for ReductTarget objects.
void reduce(const Ordinal count, const ReductTarget *const inBuffer[], ReductTarget *const inoutBuffer[]) const
ReductTargetReductionOp< Scalar > & operator=(const ReductTargetReductionOp< Scalar > &)
ReductTargetReductionOp()
Teuchos::RCP< const RTOpT< Scalar > > op_
Serializer subclass for ReductTarget objects.
index_type getBufferSize(const index_type count) const
void deserialize(const index_type bytes, const char charBuffer[], const index_type count, ReductTarget *const reduct_objs[]) const
Teuchos::RCP< const RTOpT< Scalar > > op_
ReductTargetSerializer & operator=(const ReductTargetSerializer &)
void serialize(const index_type count, const ReductTarget *const reduct_objs[], const index_type bytes, char charBuffer[]) const
Teuchos::RCP< ReductTarget > createObj() const
Abstract base class for all reduction objects.
Class for a changeable sub-vector.
Class for a changeable sub-vector.
Teuchos_Ordinal index_type
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.
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.
void set_SPMD_apply_op_dump_out(const RCP< FancyOStream > &dumpOut)
Set up to show a dump of RTOps applied through SPMD_apply_op().
int serializedSize(int num_values, int num_indexes, int num_chars)
Return the size in bytes of an external representation of a ReductTarget object.
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.
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.