RTOp Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RTOpPack_TOpSetSubVector.hpp
Go to the documentation of this file.
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"
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 
69 
70 }; // class TOpSetSubVector
71 
72 
73 } // namespace RTOpPack
74 
75 
76 #ifndef HAVE_TEUCHOS_EXPLICIT_INSTANIATION
78 #endif
79 
80 
81 #endif // RTOPPACK_TOP_SET_SUB_VECTOR_HPP
void set_sub_vec(const SparseSubVectorT< Scalar > &sub_vec)
Class for a changeable sub-vector.
Class for a (sparse or dense) sub-vector.
Class for a non-changeable sub-vector.
Templated interface to vector reduction/transformation operators {abstract}.
Advanced transformation operator that assigns elements from a sparse explicit vector.
PrimitiveTypeTraits< Scalar, Scalar >::primitiveType primitive_value_type
RTOpT< Scalar >::primitive_value_type primitive_value_type
SparseSubVectorT< Scalar > sub_vec_
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