|
RTOp Package Browser (Single Doxygen Collection) Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // RTOp: Interfaces and Support Software for Vector Reduction Transformation 00005 // Operations 00006 // Copyright (2006) Sandia Corporation 00007 // 00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00009 // license for use of this work by or on behalf of the U.S. Government. 00010 // 00011 // This library is free software; you can redistribute it and/or modify 00012 // it under the terms of the GNU Lesser General Public License as 00013 // published by the Free Software Foundation; either version 2.1 of the 00014 // License, or (at your option) any later version. 00015 // 00016 // This library is distributed in the hope that it will be useful, but 00017 // WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 // Lesser General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Lesser General Public 00022 // License along with this library; if not, write to the Free Software 00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00024 // USA 00025 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 00026 // 00027 // *********************************************************************** 00028 // @HEADER 00029 00030 #ifndef RTOPPACK_RTOP_SUB_RANGE_DECORATOR_DECL_HPP 00031 #define RTOPPACK_RTOP_SUB_RANGE_DECORATOR_DECL_HPP 00032 00033 00034 #include "RTOpPack_RTOpT.hpp" 00035 #include "Teuchos_ConstNonconstObjectContainer.hpp" 00036 00037 00038 namespace RTOpPack { 00039 00040 00071 template<class Scalar> 00072 class RTOpSubRangeDecorator : public RTOpT<Scalar> { 00073 public: 00074 00077 00079 typedef typename RTOpT<Scalar>::primitive_value_type primitive_value_type; 00080 00082 00085 00087 RTOpSubRangeDecorator(); 00088 00090 RTOpSubRangeDecorator( 00091 const RCP<RTOpT<Scalar> > &op, 00092 const Ordinal first_ele_offset = 0, 00093 const Ordinal sub_dim = -1 00094 ); 00095 00097 RTOpSubRangeDecorator( 00098 const RCP<const RTOpT<Scalar> > &op, 00099 const Ordinal first_ele_offset = 0, 00100 const Ordinal sub_dim = -1 00101 ); 00102 00104 void nonconstInitialize( 00105 const RCP<RTOpT<Scalar> > &op, 00106 const Ordinal first_ele_offset = 0, 00107 const Ordinal sub_dim = -1 00108 ); 00109 00111 void initialize( 00112 const RCP<const RTOpT<Scalar> > &op, 00113 const Ordinal first_ele_offset = 0, 00114 const Ordinal sub_dim = -1 00115 ); 00116 00118 RCP<RTOpT<Scalar> > getNonconstOp(); 00119 00121 RCP<const RTOpT<Scalar> > getOp() const; 00122 00124 00127 00129 void get_reduct_type_num_entries_impl( 00130 const Ptr<int> &num_values, 00131 const Ptr<int> &num_indexes, 00132 const Ptr<int> &num_chars 00133 ) const; 00135 Teuchos::RCP<ReductTarget> reduct_obj_create_impl() const; 00137 void reduce_reduct_objs_impl( const ReductTarget &in_reduct_obj, 00138 const Ptr<ReductTarget> &inout_reduct_obj) const; 00140 void reduct_obj_reinit_impl( const Ptr<ReductTarget> &reduct_obj ) const; 00142 void extract_reduct_obj_state_impl( 00143 const ReductTarget &reduct_obj, 00144 const ArrayView<primitive_value_type> &value_data, 00145 const ArrayView<index_type> &index_data, 00146 const ArrayView<char_type> &char_data 00147 ) const; 00149 void load_reduct_obj_state_impl( 00150 const ArrayView<const primitive_value_type> &value_data, 00151 const ArrayView<const index_type> &index_data, 00152 const ArrayView<const char_type> &char_data, 00153 const Ptr<ReductTarget> &reduct_obj 00154 ) const; 00156 std::string op_name_impl() const; 00158 bool coord_invariant_impl() const; 00160 void apply_op_impl( 00161 const ArrayView<const ConstSubVectorView<Scalar> > &sub_vecs, 00162 const ArrayView<const SubVectorView<Scalar> > &targ_sub_vecs, 00163 const Ptr<ReductTarget> &reduct_obj 00164 ) const; 00165 00167 00168 private: 00169 00170 Teuchos::ConstNonconstObjectContainer<RTOpT<Scalar> > op_; 00171 Ordinal first_ele_offset_; 00172 Ordinal sub_dim_; 00173 00174 }; 00175 00176 00177 } // namespace RTOpPack 00178 00179 00180 #endif // RTOPPACK_RTOP_SUB_RANGE_DECORATOR_DECL_HPP
1.7.4