44 #ifndef RTOPPACK_RTOP_NEW_T_DECL_HPP 45 #define RTOPPACK_RTOP_NEW_T_DECL_HPP 48 #include "RTOpPack_Types.hpp" 49 #include "Teuchos_Describable.hpp" 168 template<
class Scalar>
169 class RTOpT :
public Teuchos::Describable {
200 const Ptr<int> &num_values,
201 const Ptr<int> &num_indexes,
202 const Ptr<int> &num_chars
205 get_reduct_type_num_entries_impl(num_values, num_indexes, num_chars);
216 return reduct_obj_create_impl();
225 const ReductTarget& in_reduct_obj,
const Ptr<ReductTarget>& inout_reduct_obj
228 reduce_reduct_objs_impl( in_reduct_obj, inout_reduct_obj );
240 reduct_obj_reinit_impl(reduct_obj);
254 const ArrayView<primitive_value_type> &value_data,
255 const ArrayView<index_type> &index_data,
256 const ArrayView<char_type> &char_data
259 extract_reduct_obj_state_impl( reduct_obj,
260 value_data, index_data, char_data );
269 const ArrayView<const primitive_value_type> &value_data,
270 const ArrayView<const index_type> &index_data,
271 const ArrayView<const char_type> &char_data,
272 const Ptr<ReductTarget> &reduct_obj
275 load_reduct_obj_state_impl( value_data, index_data, char_data, reduct_obj );
294 return op_name_impl();
308 return coord_invariant_impl();
397 const Ptr<ReductTarget> &reduct_obj
400 apply_op_impl(sub_vecs, targ_sub_vecs, reduct_obj);
411 virtual void get_reduct_type_num_entries_impl(
412 const Ptr<int> &num_values,
413 const Ptr<int> &num_indexes,
414 const Ptr<int> &num_chars
418 virtual Teuchos::RCP<ReductTarget> reduct_obj_create_impl()
const;
421 virtual void reduce_reduct_objs_impl(
422 const ReductTarget& in_reduct_obj,
const Ptr<ReductTarget>& inout_reduct_obj
426 virtual void reduct_obj_reinit_impl(
const Ptr<ReductTarget> &reduct_obj )
const;
429 virtual void extract_reduct_obj_state_impl(
431 const ArrayView<primitive_value_type> &value_data,
432 const ArrayView<index_type> &index_data,
433 const ArrayView<char_type> &char_data
437 virtual void load_reduct_obj_state_impl(
438 const ArrayView<const primitive_value_type> &value_data,
439 const ArrayView<const index_type> &index_data,
440 const ArrayView<const char_type> &char_data,
441 const Ptr<ReductTarget> &reduct_obj
445 virtual std::string op_name_impl()
const;
448 virtual bool coord_invariant_impl()
const;
451 virtual Range1D range_impl()
const;
454 virtual void apply_op_impl(
457 const Ptr<ReductTarget> &reduct_obj
467 RTOpT(
const std::string &op_name_base =
"" );
470 void setOpNameBase(
const std::string &op_name_base );
479 std::string op_name_;
481 void throwNoReductError()
const;
493 #endif // RTOPPACK_RTOP_NEW_T_DECL_HPP std::string op_name() const
Return the name (as a null-terminated C-style string) of the operator.
Range1D range() const
Returns the continuous range of elements that this operator is defined over.
Class for a changeable sub-vector.
void get_reduct_type_num_entries(const Ptr< int > &num_values, const Ptr< int > &num_indexes, const Ptr< int > &num_chars) const
Get the number of entries of each basic data type in the externalized state for a reduction object fo...
bool coord_invariant() const
Returns true if this operator is coordinate invariant.
Class for a non-changeable sub-vector.
Templated interface to vector reduction/transformation operators {abstract}.
void extract_reduct_obj_state(const ReductTarget &reduct_obj, const ArrayView< primitive_value_type > &value_data, const ArrayView< index_type > &index_data, const ArrayView< char_type > &char_data) const
Extract the state of an already created reduction object.
void load_reduct_obj_state(const ArrayView< const primitive_value_type > &value_data, const ArrayView< const index_type > &index_data, const ArrayView< const char_type > &char_data, const Ptr< ReductTarget > &reduct_obj) const
Load the state of an already created reduction object given arrays of primitive objects.
void reduct_obj_reinit(const Ptr< ReductTarget > &reduct_obj) const
Reinitialize an already created reduction object.
PrimitiveTypeTraits< Scalar, Scalar >::primitiveType primitive_value_type
Abstract base class for all reduction objects.
void reduce_reduct_objs(const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
Reduce intermediate reduction target objects.
Teuchos::RCP< ReductTarget > reduct_obj_create() const
Creates a new reduction target object initialized and ready to be used in a reduction.
void apply_op(const ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Ptr< ReductTarget > &reduct_obj) const
Apply the reduction/transformation operator to a set of sub-vectors.