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_TOpSetSubVector.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_TOP_SET_SUB_VECTOR_HPP
12 #define RTOPPACK_TOP_SET_SUB_VECTOR_HPP
13 
14 #include "RTOpPack_RTOpTHelpers.hpp"
15 #include "RTOpPack_SparseSubVectorT.hpp"
16 
17 
18 namespace RTOpPack {
19 
20 
26 template<class Scalar>
27 class TOpSetSubVector : public RTOpT<Scalar> {
28 public:
29 
32 
35 
38 
40  TOpSetSubVector( const SparseSubVectorT<Scalar> &sub_vec );
41 
43  void set_sub_vec( const SparseSubVectorT<Scalar> &sub_vec );
44 
46 
47 protected:
48 
51 
53  bool coord_invariant_impl() const;
54 
56  void apply_op_impl(
57  const ArrayView<const ConstSubVectorView<Scalar> > &sub_vecs,
58  const ArrayView<const SubVectorView<Scalar> > &targ_sub_vecs,
59  const Ptr<ReductTarget> &reduct_obj
60  ) const;
61 
63 
64 private:
65 
66  enum { num_sub_vec_members = 6 };
67 
68  SparseSubVectorT<Scalar> sub_vec_;
69 
70 }; // class TOpSetSubVector
71 
72 
73 } // namespace RTOpPack
74 
75 
76 #ifndef HAVE_TEUCHOS_EXPLICIT_INSTANIATION
77 # include "RTOpPack_TOpSetSubVector_def.hpp"
78 #endif
79 
80 
81 #endif // RTOPPACK_TOP_SET_SUB_VECTOR_HPP
void set_sub_vec(const SparseSubVectorT< Scalar > &sub_vec)
Advanced transformation operator that assigns elements from a sparse explicit vector.
RTOpT< Scalar >::primitive_value_type primitive_value_type
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