AbstractLinAlgPack_COOMatrixWithPartitionedViewSubclass.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef COO_MATRIX_WITH_PARTITIONED_VIEW_SUBCLASS_H
00030 #define COO_MATRIX_WITH_PARTITIONED_VIEW_SUBCLASS_H
00031 
00032 #include "AbstractLinAlgPack_MatrixWithOpConcreteEncap.hpp"
00033 #include "AbstractLinAlgPack_COOMatrixWithPartitionedView.hpp"
00034 #include "AbstractLinAlgPack_ConvertToCSC.hpp"
00035 #include "MatrixConvertToSparseFortranCompatible.hpp"
00036 #include "AbstractLinAlgPack_COOMPartitionOut.hpp"
00037 
00038 namespace AbstractLinAlgPack {
00039 
00045 class COOMatrixWithPartitionedViewSubclass
00046   : public MatrixWithOpConcreteEncap<COOMatrixWithPartitionedView>
00047     , public ConvertToCSC
00048     , public MatrixConvertToSparseFortranCompatible
00049 {
00050 public:
00051 
00053   COOMatrixWithPartitionedViewSubclass()
00054   {}
00055 
00057   COOMatrixWithPartitionedViewSubclass(const COOMatrixWithPartitionedView& m)
00058     : MatrixWithOpConcreteEncap<COOMatrixWithPartitionedView>(m)
00059   {}
00060 
00061   // /////////////////////////////////////////////////////
00062   // Overridden from Matrix
00063   size_type nz() const;
00064 
00065   // /////////////////////////////////////////////////////
00066   // Overridden from MatrixOp
00067 
00069   std::ostream& output(std::ostream& out) const;
00070 
00071   // /////////////////////////////////////////////////////
00074 
00076   void Mp_StM(DMatrixSlice* gms_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const;
00077 
00078   //    end Level-1 BLAS
00080 
00081   // ////////////////////////////////////////////////////
00084 
00086   void Vp_StMtV(DVectorSlice* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
00087     , const DVectorSlice& vs_rhs2, value_type beta) const;
00088 
00090   void Vp_StMtV(DVectorSlice* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
00091     , const SpVectorSlice& sv_rhs2, value_type beta) const;
00092 
00094   value_type transVtMtV(const DVectorSlice& vs_rhs1, BLAS_Cpp::Transp trans_rhs2
00095     , const DVectorSlice& vs_rhs3) const;
00096 
00098   value_type transVtMtV(const SpVectorSlice& sv_rhs1, BLAS_Cpp::Transp trans_rhs2
00099     , const SpVectorSlice& sv_rhs3) const;
00100 
00101   //    end Level-2 BLAS
00103 
00104   // ////////////////////////////////////////////////////
00107 
00109   void Mp_StMtM(DMatrixSlice* gms_lhs, value_type alpha
00110     , BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice& gms_rhs2
00111     , BLAS_Cpp::Transp trans_rhs2, value_type beta) const;
00112 
00114   void Mp_StMtM(DMatrixSlice* gms_lhs, value_type alpha, const DMatrixSlice& gms_rhs1
00115     , BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2, value_type beta) const;
00116 
00117   //    end Level-3 BLAS
00119 
00120   // /////////////////////////////////////////////////////
00121   // Overridden from ConvertToCSC
00122 
00124   size_type num_in_column(
00125       BLAS_Cpp::Transp          trans
00126     , size_type             col_offset
00127     , const IVector::value_type*    col_perm
00128     , size_type*            num_in_col  ) const;
00129     
00131   void insert_nonzeros(
00132       BLAS_Cpp::Transp          trans
00133     , value_type            alpha
00134     , size_type             row_offset
00135     , size_type             col_offset
00136     , const IVector::value_type*    row_perm
00137     , const IVector::value_type*    col_perm
00138     , size_type*            next_nz_in_col
00139     , FortranTypes::f_dbl_prec*     D_val
00140     , FortranTypes::f_int*        D_row_i     ) const;
00141 
00143   value_type insert_scaled_nonzeros(
00144       BLAS_Cpp::Transp          trans
00145     , value_type            scaled_max_ele
00146     , size_type             row_offset
00147     , size_type             col_offset
00148     , const IVector::value_type*    row_perm
00149     , const IVector::value_type*    col_perm
00150     , size_type*            next_nz_in_col
00151     , FortranTypes::f_dbl_prec*     D_val
00152     , FortranTypes::f_int*        D_row_i     ) const;
00153 
00154   // ////////////////////////////////////////////////////////////
00155   // Overridden from MatrixConvertToSparseFortranCompatible
00156 
00158   FortranTypes::f_int num_nonzeros( EExtractRegion extract_region ) const;
00159 
00161   void coor_extract_nonzeros(
00162       EExtractRegion extract_region
00163     , const FortranTypes::f_int len_Aval
00164       , FortranTypes::f_dbl_prec Aval[]
00165     , const FortranTypes::f_int len_Aij
00166       , FortranTypes::f_int Arow[]
00167       , FortranTypes::f_int Acol[]
00168       , const FortranTypes::f_int row_offset
00169       , const FortranTypes::f_int col_offset
00170      ) const;
00171 
00172 };  // end class COOMatrixWithPartitionedViewSubclass
00173 
00174 } // end namespace AbstractLinAlgPack 
00175 
00176 #endif  // COO_MATRIX_WITH_PARTITIONED_VIEW_SUBCLASS_H

Generated on Tue Oct 20 12:51:42 2009 for MOOCHO (Single Doxygen Collection) by doxygen 1.4.7