RTOpPack_RTOpTDecl.hpp

Go to the documentation of this file.
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_NEW_T_DECL_HPP
00031 #define RTOPPACK_RTOP_NEW_T_DECL_HPP
00032 
00033 #include "RTOpPack_Types.hpp"
00034 #include "Teuchos_RefCountPtr.hpp"
00035 #include "Teuchos_PrimitiveTypeTraits.hpp"
00036 #include "Teuchos_Describable.hpp"
00037 
00038 namespace RTOpPack {
00039 
00043 
00046 class ReductTarget : public Teuchos::Describable
00047 {};
00048 
00157 template<class Scalar>
00158 class RTOpT : public Teuchos::Describable {
00159 public:
00160 
00163 
00165   typedef typename Teuchos::PrimitiveTypeTraits<Scalar>::primitiveType  primitive_value_type;
00166 
00168 
00170   RTOpT( const std::string &op_name_base );
00171 
00174 
00190   virtual void get_reduct_type_num_entries(
00191     int*   num_values
00192     ,int*  num_indexes
00193     ,int*  num_chars
00194     ) const;
00205   virtual Teuchos::RefCountPtr<ReductTarget> reduct_obj_create() const;
00211   virtual void reduce_reduct_objs(
00212     const ReductTarget& in_reduct_obj, ReductTarget* inout_reduct_obj
00213     ) const;
00221   virtual void reduct_obj_reinit( ReductTarget* reduct_obj ) const;
00231   virtual void extract_reduct_obj_state(
00232     const ReductTarget        &reduct_obj
00233     ,int                      num_values
00234     ,primitive_value_type     value_data[]
00235     ,int                      num_indexes
00236     ,index_type               index_data[]
00237     ,int                      num_chars
00238     ,char_type                char_data[]
00239     ) const;
00245   virtual void load_reduct_obj_state(
00246     int                            num_values
00247     ,const primitive_value_type    value_data[]
00248     ,int                           num_indexes
00249     ,const index_type              index_data[]
00250     ,int                           num_chars
00251     ,const char_type               char_data[]
00252     ,ReductTarget                 *reduct_obj
00253     ) const;
00254 
00256 
00259 
00269   virtual const char* op_name() const;
00277   virtual RTOpT<Scalar>& operator=(const RTOpT<Scalar>& op);
00286   virtual void get_op_type_num_entries(
00287     int*  num_values
00288     ,int* num_indexes
00289     ,int* num_chars
00290     ) const;
00313   virtual void extract_op_state(
00314     int                             num_values
00315     ,primitive_value_type           value_data[]
00316     ,int                            num_indexes
00317     ,index_type                     index_data[]
00318     ,int                            num_chars
00319     ,char_type                      char_data[]
00320     ) const;
00343   virtual void load_op_state(
00344     int                           num_values
00345     ,const primitive_value_type   value_data[]
00346     ,int                          num_indexes
00347     ,const index_type             index_data[]
00348     ,int                          num_chars
00349     ,const char_type              char_data[]
00350     );
00356   virtual bool coord_invariant() const;
00424   virtual void apply_op(
00425     const int   num_vecs,       const ConstSubVectorView<Scalar>  sub_vecs[]
00426     ,const int  num_targ_vecs,  const SubVectorView<Scalar>       targ_sub_vecs[]
00427     ,ReductTarget *reduct_obj
00428     ) const = 0;
00429 
00431 
00432 private:
00433 
00434   std::string op_name_;
00435 
00436 }; // end class RTOpT
00437 
00438 } // end namespace RTOpPack
00439 
00440 #endif // RTOPPACK_RTOP_NEW_T_DECL_HPP

Generated on Thu Sep 18 12:30:42 2008 for RTOp Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1