Collection of Concrete Vector Reduction/Transformation Operator Implementations
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
ops_lib
RTOpPack_ROpGetSubVector_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_ROP_GET_SUB_VECTOR_DECL_HPP
44
#define RTOPPACK_ROP_GET_SUB_VECTOR_DECL_HPP
45
46
47
#include "RTOpPack_RTOpTHelpers.hpp"
48
49
50
namespace
RTOpPack {
51
52
58
template
<
class
Scalar>
59
class
ROpGetSubVector
:
public
RTOpT
<Scalar> {
60
public
:
61
63
typedef
typename
RTOpT<Scalar>::primitive_value_type
primitive_value_type
;
64
66
ROpGetSubVector
(
const
index_type l = 0,
const
index_type u = 0 );
67
69
void
set_range
(
const
index_type l,
const
index_type u );
70
74
const
ConstSubVectorView<Scalar>
operator()
(
75
const
ReductTarget
& reduct_obj )
const
;
76
79
81
void
get_reduct_type_num_entries_impl
(
82
const
Ptr<int> &num_values,
83
const
Ptr<int> &num_indexes,
84
const
Ptr<int> &num_chars
85
)
const
;
87
Teuchos::RCP<ReductTarget>
reduct_obj_create_impl
()
const
;
89
void
reduce_reduct_objs_impl
(
const
ReductTarget
&in_reduct_obj,
90
const
Ptr<ReductTarget> &inout_reduct_obj)
const
;
92
void
reduct_obj_reinit_impl
(
const
Ptr<ReductTarget> &reduct_obj )
const
;
94
void
extract_reduct_obj_state_impl
(
95
const
ReductTarget
&reduct_obj,
96
const
ArrayView<primitive_value_type> &value_data,
97
const
ArrayView<index_type> &index_data,
98
const
ArrayView<char_type> &char_data
99
)
const
;
101
void
load_reduct_obj_state_impl
(
102
const
ArrayView<const primitive_value_type> &value_data,
103
const
ArrayView<const index_type> &index_data,
104
const
ArrayView<const char_type> &char_data,
105
const
Ptr<ReductTarget> &reduct_obj
106
)
const
;
108
bool
coord_invariant_impl
()
const
;
110
void
apply_op_impl
(
111
const
ArrayView<
const
ConstSubVectorView<Scalar>
> &sub_vecs,
112
const
ArrayView<
const
SubVectorView<Scalar>
> &targ_sub_vecs,
113
const
Ptr<ReductTarget> &reduct_obj
114
)
const
;
115
117
118
private
:
119
120
index_type l_;
121
index_type u_;
122
123
};
// class ROpGetSubVector
124
125
126
}
// namespace RTOpPack
127
128
129
#endif
// RTOPPACK_ROP_GET_SUB_VECTOR_DECL_HPP
RTOpPack::ConstSubVectorView
RTOpPack::ROpGetSubVector::coord_invariant_impl
bool coord_invariant_impl() const
Definition
RTOpPack_ROpGetSubVector_def.hpp:227
RTOpPack::ROpGetSubVector::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_ROpGetSubVector_def.hpp:84
RTOpPack::ROpGetSubVector::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_ROpGetSubVector_def.hpp:194
RTOpPack::ROpGetSubVector::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_ROpGetSubVector_def.hpp:166
RTOpPack::ROpGetSubVector::reduct_obj_create_impl
Teuchos::RCP< ReductTarget > reduct_obj_create_impl() const
Definition
RTOpPack_ROpGetSubVector_def.hpp:100
RTOpPack::ROpGetSubVector::reduct_obj_reinit_impl
void reduct_obj_reinit_impl(const Ptr< ReductTarget > &reduct_obj) const
Definition
RTOpPack_ROpGetSubVector_def.hpp:153
RTOpPack::ROpGetSubVector::ROpGetSubVector
ROpGetSubVector(const index_type l=0, const index_type u=0)
Definition
RTOpPack_ROpGetSubVector_def.hpp:54
RTOpPack::ROpGetSubVector::set_range
void set_range(const index_type l, const index_type u)
Set the range of global indexes to extract elements for.
Definition
RTOpPack_ROpGetSubVector_def.hpp:62
RTOpPack::ROpGetSubVector::operator()
const ConstSubVectorView< Scalar > operator()(const ReductTarget &reduct_obj) const
Extract the subvector after all of the reductions are completed.
Definition
RTOpPack_ROpGetSubVector_def.hpp:73
RTOpPack::ROpGetSubVector::reduce_reduct_objs_impl
void reduce_reduct_objs_impl(const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
Definition
RTOpPack_ROpGetSubVector_def.hpp:112
RTOpPack::ROpGetSubVector::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_ROpGetSubVector_def.hpp:234
RTOpPack::ROpGetSubVector::primitive_value_type
RTOpT< Scalar >::primitive_value_type primitive_value_type
Definition
RTOpPack_ROpGetSubVector_decl.hpp:63
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