|
Collection of Concrete Vector Reduction/Transformation Operator Implementations 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_ROP_GET_SUB_VECTOR_DECL_HPP 00031 #define RTOPPACK_ROP_GET_SUB_VECTOR_DECL_HPP 00032 00033 00034 #include "RTOpPack_RTOpTHelpers.hpp" 00035 00036 00037 namespace RTOpPack { 00038 00039 00045 template<class Scalar> 00046 class ROpGetSubVector : public RTOpT<Scalar> { 00047 public: 00048 00050 typedef typename RTOpT<Scalar>::primitive_value_type primitive_value_type; 00051 00053 ROpGetSubVector( const index_type l = 0, const index_type u = 0 ); 00054 00056 void set_range( const index_type l, const index_type u ); 00057 00061 const ConstSubVectorView<Scalar> operator()( 00062 const ReductTarget& reduct_obj ) const; 00063 00066 00068 void get_reduct_type_num_entries_impl( 00069 const Ptr<int> &num_values, 00070 const Ptr<int> &num_indexes, 00071 const Ptr<int> &num_chars 00072 ) const; 00074 Teuchos::RCP<ReductTarget> reduct_obj_create_impl() const; 00076 void reduce_reduct_objs_impl( const ReductTarget &in_reduct_obj, 00077 const Ptr<ReductTarget> &inout_reduct_obj) const; 00079 void reduct_obj_reinit_impl( const Ptr<ReductTarget> &reduct_obj ) const; 00081 void extract_reduct_obj_state_impl( 00082 const ReductTarget &reduct_obj, 00083 const ArrayView<primitive_value_type> &value_data, 00084 const ArrayView<index_type> &index_data, 00085 const ArrayView<char_type> &char_data 00086 ) const; 00088 void load_reduct_obj_state_impl( 00089 const ArrayView<const primitive_value_type> &value_data, 00090 const ArrayView<const index_type> &index_data, 00091 const ArrayView<const char_type> &char_data, 00092 const Ptr<ReductTarget> &reduct_obj 00093 ) const; 00095 bool coord_invariant_impl() const; 00097 void apply_op_impl( 00098 const ArrayView<const ConstSubVectorView<Scalar> > &sub_vecs, 00099 const ArrayView<const SubVectorView<Scalar> > &targ_sub_vecs, 00100 const Ptr<ReductTarget> &reduct_obj 00101 ) const; 00102 00104 00105 private: 00106 00107 index_type l_; 00108 index_type u_; 00109 00110 }; // class ROpGetSubVector 00111 00112 00113 } // namespace RTOpPack 00114 00115 00116 #endif // RTOPPACK_ROP_GET_SUB_VECTOR_DECL_HPP
1.7.4