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 73 void set_SPMD_apply_op_dump_out(
const RCP<FancyOStream> &dumpOut);
81 template<
class PrimitiveScalar>
93 template<
class Scalar>
95 const RTOpT<Scalar> &op,
99 const ReductTarget &reduct_obj,
100 char reduct_obj_ext[]
108 template<
class Scalar>
110 const RTOpT<Scalar> &op,
114 const char reduct_obj_ext[],
115 ReductTarget *reduct_obj
123 template<
class Scalar>
136 const index_type count
138 ,
const index_type bytes
142 Teuchos::RCP<ReductTarget>
createObj()
const;
145 const index_type bytes
146 ,
const char charBuffer[]
147 ,
const index_type count
152 Teuchos::RCP<const RTOpT<Scalar> > op_;
156 int reduct_obj_ext_size_;
167 template<
class Scalar>
169 :
public Teuchos::ReferenceTypeReductionOp<Teuchos_Ordinal,ReductTarget>
188 Teuchos::RCP<const RTOpT<Scalar> > op_;
202 template<
class Scalar>
203 void SPMD_all_reduce(
204 const Teuchos::Comm<index_type> *comm
219 template<
class Scalar>
221 const Teuchos::Comm<index_type> *comm
225 ,
const int num_targ_vecs
238 template<
class Scalar>
240 const Teuchos::Comm<index_type> *comm
243 ,
const int num_multi_vecs
245 ,
const int num_targ_multi_vecs
258 template<
class Scalar>
260 const Teuchos::Comm<index_type> *comm
265 ,
const int num_targ_vecs
274 #endif // RTOPPACK_SPMD_APPLY_OP_DECL_HPP void deserialize(const index_type bytes, const char charBuffer[], const index_type count, ReductTarget *const reduct_objs[]) const
ReductionOp subclass for ReductTarget objects.
Serializer subclass for ReductTarget objects.
Teuchos::RCP< ReductTarget > createObj() const
void serialize(const index_type count, const ReductTarget *const reduct_objs[], const index_type bytes, char charBuffer[]) const
void reduce(const Ordinal count, const ReductTarget *const inBuffer[], ReductTarget *const inoutBuffer[]) const
index_type getBufferSize(const index_type count) const