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);
75 #ifdef RTOPPACK_ENABLE_SHOW_DUMP
76 RTOP_DEPRECATED
extern bool show_spmd_apply_op_dump;
77 #endif // RTOPPACK_ENABLE_SHOW_DUMP
85 template<
class PrimitiveScalar>
97 template<
class Scalar>
99 const RTOpT<Scalar> &op,
103 const ReductTarget &reduct_obj,
104 char reduct_obj_ext[]
112 template<
class Scalar>
114 const RTOpT<Scalar> &op,
118 const char reduct_obj_ext[],
119 ReductTarget *reduct_obj
127 template<
class Scalar>
140 const index_type count
142 ,
const index_type bytes
146 Teuchos::RCP<ReductTarget>
createObj()
const;
149 const index_type bytes
150 ,
const char charBuffer[]
151 ,
const index_type count
156 Teuchos::RCP<const RTOpT<Scalar> > op_;
160 int reduct_obj_ext_size_;
171 template<
class Scalar>
173 :
public Teuchos::ReferenceTypeReductionOp<Teuchos_Ordinal,ReductTarget>
192 Teuchos::RCP<const RTOpT<Scalar> > op_;
206 template<
class Scalar>
207 void SPMD_all_reduce(
208 const Teuchos::Comm<index_type> *comm
223 template<
class Scalar>
225 const Teuchos::Comm<index_type> *comm
229 ,
const int num_targ_vecs
242 template<
class Scalar>
244 const Teuchos::Comm<index_type> *comm
247 ,
const int num_multi_vecs
249 ,
const int num_targ_multi_vecs
262 template<
class Scalar>
264 const Teuchos::Comm<index_type> *comm
269 ,
const int num_targ_vecs
278 #endif // RTOPPACK_SPMD_APPLY_OP_DECL_HPP