45 #include "RTOpPack_RTOpC.hpp"
46 #include "Teuchos_Workspace.hpp"
53 :
RTOpT<RTOp_value_type>(
"RTOpC")
79 ,
"RTOpC::get_reduct_type_num_entries(...): Error, "
80 "RTOp_get_reduct_type_num_entries(...) returned != 0"
88 RTOp_ReductTarget reduct_obj_raw = RTOp_REDUCT_OBJ_NULL;
92 ,
"RTOpC::reduct_obj_create(...): Error, "
93 "RTOp_reduct_obj_create(...) returned != 0"
107 ,
"RTOpC::reduce_reduct_objs(...): Error, "
108 "RTOp_reduce_reduct_objs(...) returned != 0"
119 ,
"RTOpC::reduct_obj_reinit(...): Error, "
120 "RTOp_reduct_obj_reinit(...) returned != 0"
134 &op_, (*
this)(reduct_obj),
140 "RTOpC::extract_reduct_obj_state(...): Error, "
141 "RTOp_extract_reduct_obj_state(...) returned != 0"
162 "RTOpC::load_reduct_obj_state(...): Error, "
163 "RTOp_load_reduct_obj_state(...) returned != 0"
180 ,
"RTOpC::get_op_name(...): Error, "
181 "RTOp_op_name(...) returned != 0"
198 const int num_vecs = sub_vecs.size();
199 const int num_targ_vecs = targ_sub_vecs.size();
201 RTOp_ReductTarget reduct_obj = RTOp_REDUCT_OBJ_NULL;
203 reduct_obj = (*this)(*_reduct_obj);
206 Workspace<RTOp_SubVector> c_sub_vecs(wss,num_vecs,
false);
207 for( k = 0; k < num_vecs; ++k ) {
211 Workspace<RTOp_MutableSubVector> c_targ_sub_vecs(wss,num_targ_vecs,
false);
212 for( k = 0; k < num_targ_vecs; ++k ) {
225 ,
"RTOpC::apply_op(...): Error, "
226 "RTOp_apply_op(...) returned RTOp_ERR_INVALID_NUM_VECS" );
229 ,
"RTOpC::apply_op(...): Error, "
230 "RTOp_apply_op(...) returned RTOp_ERR_INVALID_NUM_TARG_VECS" );
233 ,
"RTOpC::apply_op(...): Error, "
234 "RTOp_apply_op(...) returned != 0 with unknown meaning" );
int RTOp_get_reduct_type_num_entries(const struct RTOp_RTOp *op, int *num_values, int *num_indexes, int *num_chars)
std::string op_name() const
bool is_null(const boost::shared_ptr< T > &p)
int RTOp_load_reduct_obj_state(const struct RTOp_RTOp *op, int num_values, const RTOp_value_type value_data[], int num_indexes, const RTOp_index_type index_data[], int num_chars, const RTOp_char_type char_data[], RTOp_ReductTarget reduct_obj)
std::string op_name_impl() const
Teuchos::RCP< ReductTarget > reduct_obj_create_impl() const
int RTOp_reduct_obj_create(const struct RTOp_RTOp *op, RTOp_ReductTarget *reduct_obj)
void RTOp_mutable_sub_vector(RTOp_index_type global_offset, RTOp_index_type sub_dim, RTOp_value_type values[], ptrdiff_t values_stride, struct RTOp_MutableSubVector *sub_vec)
int RTOp_reduce_reduct_objs(const struct RTOp_RTOp *op, RTOp_ReductTarget in_reduct_obj, RTOp_ReductTarget inout_reduct_obj)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void get_reduct_type_num_entries_impl(const Teuchos::Ptr< int > &num_values, const Teuchos::Ptr< int > &num_indexes, const Teuchos::Ptr< int > &num_chars) const
void extract_reduct_obj_state_impl(const ReductTarget &reduct_obj, const Teuchos::ArrayView< primitive_value_type > &value_data, const Teuchos::ArrayView< index_type > &index_data, const Teuchos::ArrayView< char_type > &char_data) const
const Scalar * values() const
void apply_op_impl(const Teuchos::ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const Teuchos::ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Teuchos::Ptr< ReductTarget > &reduct_obj) const
bool coord_invariant_impl() const
int RTOp_extract_reduct_obj_state(const struct RTOp_RTOp *op, const RTOp_ReductTarget reduct_obj, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
void RTOp_sub_vector(RTOp_index_type global_offset, RTOp_index_type sub_dim, const RTOp_value_type values[], ptrdiff_t values_stride, struct RTOp_SubVector *sub_vec)
int RTOp_get_op_name(const struct RTOp_RTOp *op, const char **op_name)
int RTOp_apply_op(const struct RTOp_RTOp *op, const int num_vecs, const struct RTOp_SubVector sub_vecs[], const int num_targ_vecs, const struct RTOp_MutableSubVector targ_sub_vecs[], RTOp_ReductTarget reduct_obj)
void reduce_reduct_objs_impl(const ReductTarget &in_reduct_obj, const Teuchos::Ptr< ReductTarget > &inout_reduct_obj) const
int RTOp_free_op(struct RTOp_RTOp *op)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos_Ordinal subDim() const
Teuchos_Ordinal globalOffset() const
Adapter subclass for RTOp_ReductTarget
void reduct_obj_reinit_impl(const Teuchos::Ptr< ReductTarget > &reduct_obj) const
Class for a mutable sub-vector.
int RTOp_reduct_obj_reinit(const struct RTOp_RTOp *op, RTOp_ReductTarget reduct_obj)
Class for a non-mutable sub-vector.
TEUCHOSCORE_LIB_DLL_EXPORT Teuchos::RCP< WorkspaceStore > get_default_workspace_store()
void load_reduct_obj_state_impl(const Teuchos::ArrayView< const primitive_value_type > &value_data, const Teuchos::ArrayView< const index_type > &index_data, const Teuchos::ArrayView< const char_type > &char_data, const Teuchos::Ptr< ReductTarget > &reduct_obj) const