Collection of Concrete Vector Reduction/Transformation Operator Implementations  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RTOpPack_ROpGetSubVector_decl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // RTOp: Interfaces and Support Software for Vector Reduction Transformation
4 // Operations
5 //
6 // Copyright 2006 NTESS and the RTOp contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef RTOPPACK_ROP_GET_SUB_VECTOR_DECL_HPP
12 #define RTOPPACK_ROP_GET_SUB_VECTOR_DECL_HPP
13 
14 
15 #include "RTOpPack_RTOpTHelpers.hpp"
16 
17 
18 namespace RTOpPack {
19 
20 
26 template<class Scalar>
27 class ROpGetSubVector : public RTOpT<Scalar> {
28 public:
29 
32 
34  ROpGetSubVector( const index_type l = 0, const index_type u = 0 );
35 
37  void set_range( const index_type l, const index_type u );
38 
43  const ReductTarget& reduct_obj ) const;
44 
47 
50  const Ptr<int> &num_values,
51  const Ptr<int> &num_indexes,
52  const Ptr<int> &num_chars
53  ) const;
57  void reduce_reduct_objs_impl( const ReductTarget &in_reduct_obj,
58  const Ptr<ReductTarget> &inout_reduct_obj) const;
60  void reduct_obj_reinit_impl( const Ptr<ReductTarget> &reduct_obj ) const;
63  const ReductTarget &reduct_obj,
64  const ArrayView<primitive_value_type> &value_data,
65  const ArrayView<index_type> &index_data,
66  const ArrayView<char_type> &char_data
67  ) const;
70  const ArrayView<const primitive_value_type> &value_data,
71  const ArrayView<const index_type> &index_data,
72  const ArrayView<const char_type> &char_data,
73  const Ptr<ReductTarget> &reduct_obj
74  ) const;
76  bool coord_invariant_impl() const;
78  void apply_op_impl(
79  const ArrayView<const ConstSubVectorView<Scalar> > &sub_vecs,
80  const ArrayView<const SubVectorView<Scalar> > &targ_sub_vecs,
81  const Ptr<ReductTarget> &reduct_obj
82  ) const;
83 
85 
86 private:
87 
88  index_type l_;
89  index_type u_;
90 
91 }; // class ROpGetSubVector
92 
93 
94 } // namespace RTOpPack
95 
96 
97 #endif // RTOPPACK_ROP_GET_SUB_VECTOR_DECL_HPP
void load_reduct_obj_state_impl(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
void reduce_reduct_objs_impl(const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
void set_range(const index_type l, const index_type u)
Set the range of global indexes to extract elements for.
void extract_reduct_obj_state_impl(const ReductTarget &reduct_obj, const ArrayView< primitive_value_type > &value_data, const ArrayView< index_type > &index_data, const ArrayView< char_type > &char_data) const
ROpGetSubVector(const index_type l=0, const index_type u=0)
RTOpT< Scalar >::primitive_value_type primitive_value_type
Teuchos::RCP< ReductTarget > reduct_obj_create_impl() const
Reduction operator that extracts a sub-vector in the range of global zero-based indexes [l...
void apply_op_impl(const ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Ptr< ReductTarget > &reduct_obj) const
void get_reduct_type_num_entries_impl(const Ptr< int > &num_values, const Ptr< int > &num_indexes, const Ptr< int > &num_chars) const
void reduct_obj_reinit_impl(const Ptr< ReductTarget > &reduct_obj) const
const ConstSubVectorView< Scalar > operator()(const ReductTarget &reduct_obj) const
Extract the subvector after all of the reductions are completed.