Support Software for Vector Reduction/Transformation Operators
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
support
RTOpPack_RTOpSubRangeDecorator_decl.hpp
1
// @HEADER
2
// ***********************************************************************
3
//
4
// RTOp: Interfaces and Support Software for Vector Reduction Transformation
5
// Operations
6
// Copyright (2006) Sandia Corporation
7
//
8
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9
// license for use of this work by or on behalf of the U.S. Government.
10
//
11
// Redistribution and use in source and binary forms, with or without
12
// modification, are permitted provided that the following conditions are
13
// met:
14
//
15
// 1. Redistributions of source code must retain the above copyright
16
// notice, this list of conditions and the following disclaimer.
17
//
18
// 2. Redistributions in binary form must reproduce the above copyright
19
// notice, this list of conditions and the following disclaimer in the
20
// documentation and/or other materials provided with the distribution.
21
//
22
// 3. Neither the name of the Corporation nor the names of the
23
// contributors may be used to endorse or promote products derived from
24
// this software without specific prior written permission.
25
//
26
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
//
38
// Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
39
//
40
// ***********************************************************************
41
// @HEADER
42
43
#ifndef RTOPPACK_RTOP_SUB_RANGE_DECORATOR_DECL_HPP
44
#define RTOPPACK_RTOP_SUB_RANGE_DECORATOR_DECL_HPP
45
46
47
#include "RTOpPack_RTOpT.hpp"
48
#include "Teuchos_ConstNonconstObjectContainer.hpp"
49
50
51
namespace
RTOpPack {
52
53
84
template
<
class
Scalar>
85
class
RTOpSubRangeDecorator
:
public
RTOpT
<Scalar> {
86
public
:
87
90
92
typedef
typename
RTOpT<Scalar>::primitive_value_type
primitive_value_type
;
93
95
98
100
RTOpSubRangeDecorator
();
101
103
RTOpSubRangeDecorator
(
104
const
RCP<
RTOpT<Scalar>
> &op,
105
const
Ordinal first_ele_offset = 0,
106
const
Ordinal sub_dim = -1
107
);
108
110
RTOpSubRangeDecorator
(
111
const
RCP<
const
RTOpT<Scalar>
> &op,
112
const
Ordinal first_ele_offset = 0,
113
const
Ordinal sub_dim = -1
114
);
115
117
void
nonconstInitialize
(
118
const
RCP<
RTOpT<Scalar>
> &op,
119
const
Ordinal first_ele_offset = 0,
120
const
Ordinal sub_dim = -1
121
);
122
124
void
initialize
(
125
const
RCP<
const
RTOpT<Scalar>
> &op,
126
const
Ordinal first_ele_offset = 0,
127
const
Ordinal sub_dim = -1
128
);
129
131
RCP<RTOpT<Scalar> >
getNonconstOp
();
132
134
RCP<const RTOpT<Scalar> >
getOp
()
const
;
135
137
140
142
void
get_reduct_type_num_entries_impl
(
143
const
Ptr<int> &num_values,
144
const
Ptr<int> &num_indexes,
145
const
Ptr<int> &num_chars
146
)
const
;
148
Teuchos::RCP<ReductTarget>
reduct_obj_create_impl
()
const
;
150
void
reduce_reduct_objs_impl
(
const
ReductTarget
&in_reduct_obj,
151
const
Ptr<ReductTarget> &inout_reduct_obj)
const
;
153
void
reduct_obj_reinit_impl
(
const
Ptr<ReductTarget> &reduct_obj )
const
;
155
void
extract_reduct_obj_state_impl
(
156
const
ReductTarget
&reduct_obj,
157
const
ArrayView<primitive_value_type> &value_data,
158
const
ArrayView<index_type> &index_data,
159
const
ArrayView<char_type> &char_data
160
)
const
;
162
void
load_reduct_obj_state_impl
(
163
const
ArrayView<const primitive_value_type> &value_data,
164
const
ArrayView<const index_type> &index_data,
165
const
ArrayView<const char_type> &char_data,
166
const
Ptr<ReductTarget> &reduct_obj
167
)
const
;
169
std::string
op_name_impl
()
const
;
171
bool
coord_invariant_impl
()
const
;
173
void
apply_op_impl
(
174
const
ArrayView<
const
ConstSubVectorView<Scalar>
> &sub_vecs,
175
const
ArrayView<
const
SubVectorView<Scalar>
> &targ_sub_vecs,
176
const
Ptr<ReductTarget> &reduct_obj
177
)
const
;
178
180
181
private
:
182
183
Teuchos::ConstNonconstObjectContainer<RTOpT<Scalar> > op_;
184
Ordinal first_ele_offset_;
185
Ordinal sub_dim_;
186
187
};
188
189
190
}
// namespace RTOpPack
191
192
193
#endif
// RTOPPACK_RTOP_SUB_RANGE_DECORATOR_DECL_HPP
RTOpPack::ConstSubVectorView
RTOpPack::RTOpSubRangeDecorator::load_reduct_obj_state_impl
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
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:182
RTOpPack::RTOpSubRangeDecorator::reduce_reduct_objs_impl
void reduce_reduct_objs_impl(const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:153
RTOpPack::RTOpSubRangeDecorator::initialize
void initialize(const RCP< const RTOpT< Scalar > > &op, const Ordinal first_ele_offset=0, const Ordinal sub_dim=-1)
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:102
RTOpPack::RTOpSubRangeDecorator::RTOpSubRangeDecorator
RTOpSubRangeDecorator()
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:57
RTOpPack::RTOpSubRangeDecorator::getNonconstOp
RCP< RTOpT< Scalar > > getNonconstOp()
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:116
RTOpPack::RTOpSubRangeDecorator::getOp
RCP< const RTOpT< Scalar > > getOp() const
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:124
RTOpPack::RTOpSubRangeDecorator::op_name_impl
std::string op_name_impl() const
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:194
RTOpPack::RTOpSubRangeDecorator::apply_op_impl
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
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:208
RTOpPack::RTOpSubRangeDecorator::primitive_value_type
RTOpT< Scalar >::primitive_value_type primitive_value_type
Definition
RTOpPack_RTOpSubRangeDecorator_decl.hpp:92
RTOpPack::RTOpSubRangeDecorator::coord_invariant_impl
bool coord_invariant_impl() const
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:201
RTOpPack::RTOpSubRangeDecorator::reduct_obj_reinit_impl
void reduct_obj_reinit_impl(const Ptr< ReductTarget > &reduct_obj) const
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:162
RTOpPack::RTOpSubRangeDecorator::get_reduct_type_num_entries_impl
void get_reduct_type_num_entries_impl(const Ptr< int > &num_values, const Ptr< int > &num_indexes, const Ptr< int > &num_chars) const
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:134
RTOpPack::RTOpSubRangeDecorator::extract_reduct_obj_state_impl
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
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:170
RTOpPack::RTOpSubRangeDecorator::nonconstInitialize
void nonconstInitialize(const RCP< RTOpT< Scalar > > &op, const Ordinal first_ele_offset=0, const Ordinal sub_dim=-1)
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:88
RTOpPack::RTOpSubRangeDecorator::reduct_obj_create_impl
Teuchos::RCP< ReductTarget > reduct_obj_create_impl() const
Definition
RTOpPack_RTOpSubRangeDecorator_def.hpp:146
RTOpPack::RTOpT::primitive_value_type
PrimitiveTypeTraits< Scalar, Scalar >::primitiveType primitive_value_type
RTOpPack::RTOpT< Scalar >::RTOpT
RTOpT(const std::string &op_name_base="")
RTOpPack::ReductTarget
RTOpPack::SubVectorView
Generated by
1.17.0