ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::ell_matrix< NumericT, AlignmentV > Class Template Reference

Sparse matrix class using the ELLPACK format for storing the nonzeros. More...

#include <ell_matrix.hpp>

Public Types

typedef viennacl::backend::mem_handle handle_type
 
typedef scalar< typename viennacl::tools::CHECK_SCALAR_TEMPLATE_ARGUMENT< NumericT >::ResultType > value_type
 
typedef vcl_size_t size_type
 

Public Member Functions

 ell_matrix ()
 
 ell_matrix (viennacl::context ctx)
 
void clear ()
 Resets all entries in the matrix back to zero without changing the matrix size. Resets the sparsity pattern. More...
 
vcl_size_t internal_size1 () const
 
vcl_size_t internal_size2 () const
 
vcl_size_t size1 () const
 
vcl_size_t size2 () const
 
vcl_size_t internal_maxnnz () const
 
vcl_size_t maxnnz () const
 
vcl_size_t nnz () const
 
vcl_size_t internal_nnz () const
 
handle_typehandle ()
 
const handle_typehandle () const
 
handle_typehandle2 ()
 
const handle_typehandle2 () const
 

Friends

template<typename CPUMatrixT , typename T , unsigned int ALIGN>
void copy (const CPUMatrixT &cpu_matrix, ell_matrix< T, ALIGN > &gpu_matrix)
 

Detailed Description

template<typename NumericT, unsigned int AlignmentV>
class viennacl::ell_matrix< NumericT, AlignmentV >

Sparse matrix class using the ELLPACK format for storing the nonzeros.

This format works best for matrices where the number of nonzeros per row is mostly the same. Finite element and finite difference methods on nicely shaped domains often result in such a nonzero pattern. For a matrix

(1 2 0 0 0) (2 3 4 0 0) (0 5 6 0 7) (0 0 8 9 0)

the entries are layed out in chunks of size 3 as (1 2 5 8; 2 3 6 9; 0 4 7 0) Note that this is a 'transposed' representation in order to maximize coalesced memory access.

Definition at line 53 of file ell_matrix.hpp.

Member Typedef Documentation

template<typename NumericT, unsigned int AlignmentV>
typedef viennacl::backend::mem_handle viennacl::ell_matrix< NumericT, AlignmentV >::handle_type

Definition at line 56 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
typedef vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::size_type

Definition at line 58 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
typedef scalar<typename viennacl::tools::CHECK_SCALAR_TEMPLATE_ARGUMENT<NumericT>::ResultType> viennacl::ell_matrix< NumericT, AlignmentV >::value_type

Definition at line 57 of file ell_matrix.hpp.

Constructor & Destructor Documentation

template<typename NumericT, unsigned int AlignmentV>
viennacl::ell_matrix< NumericT, AlignmentV >::ell_matrix ( )
inline

Definition at line 60 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
viennacl::ell_matrix< NumericT, AlignmentV >::ell_matrix ( viennacl::context  ctx)
inline

Definition at line 62 of file ell_matrix.hpp.

Member Function Documentation

template<typename NumericT, unsigned int AlignmentV>
void viennacl::ell_matrix< NumericT, AlignmentV >::clear ( )
inline

Resets all entries in the matrix back to zero without changing the matrix size. Resets the sparsity pattern.

Definition at line 77 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
handle_type& viennacl::ell_matrix< NumericT, AlignmentV >::handle ( )
inline

Definition at line 100 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
const handle_type& viennacl::ell_matrix< NumericT, AlignmentV >::handle ( ) const
inline

Definition at line 101 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
handle_type& viennacl::ell_matrix< NumericT, AlignmentV >::handle2 ( )
inline

Definition at line 103 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
const handle_type& viennacl::ell_matrix< NumericT, AlignmentV >::handle2 ( ) const
inline

Definition at line 104 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::internal_maxnnz ( ) const
inline

Definition at line 94 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::internal_nnz ( ) const
inline

Definition at line 98 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::internal_size1 ( ) const
inline

Definition at line 88 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::internal_size2 ( ) const
inline

Definition at line 89 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::maxnnz ( ) const
inline

Definition at line 95 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::nnz ( ) const
inline

Definition at line 97 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::size1 ( ) const
inline

Definition at line 91 of file ell_matrix.hpp.

template<typename NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::ell_matrix< NumericT, AlignmentV >::size2 ( ) const
inline

Definition at line 92 of file ell_matrix.hpp.

Friends And Related Function Documentation

template<typename NumericT, unsigned int AlignmentV>
template<typename CPUMatrixT , typename T , unsigned int ALIGN>
void copy ( const CPUMatrixT &  cpu_matrix,
ell_matrix< T, ALIGN > &  gpu_matrix 
)
friend

The documentation for this class was generated from the following file: