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

A Toeplitz matrix class. More...

#include <forwards.h>

Public Types

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

Public Member Functions

 toeplitz_matrix ()
 The default constructor. Does not allocate any memory. More...
 
 toeplitz_matrix (vcl_size_t rows, vcl_size_t cols)
 Creates the matrix with the given size. More...
 
void resize (vcl_size_t sz, bool preserve=true)
 Resizes the matrix. Existing entries can be preserved. More...
 
handle_type const & handle () const
 Returns the OpenCL handle. More...
 
viennacl::vector< NumericT, AlignmentV > & elements ()
 Returns an internal viennacl::vector, which represents a Toeplitz matrix elements. More...
 
viennacl::vector< NumericT, AlignmentV > const & elements () const
 
vcl_size_t size1 () const
 Returns the number of rows of the matrix. More...
 
vcl_size_t size2 () const
 Returns the number of columns of the matrix. More...
 
vcl_size_t internal_size () const
 Returns the internal size of matrix representtion. Usually required for launching OpenCL kernels only. More...
 
entry_proxy< NumericToperator() (vcl_size_t row_index, vcl_size_t col_index)
 Read-write access to a single element of the matrix. More...
 
toeplitz_matrix< NumericT, AlignmentV > & operator+= (toeplitz_matrix< NumericT, AlignmentV > &that)
 += operation for Toeplitz matrices More...
 

Detailed Description

template<class NumericT, unsigned int AlignmentV>
class viennacl::toeplitz_matrix< NumericT, AlignmentV >

A Toeplitz matrix class.

Template Parameters
NumericTThe underlying scalar type (either float or double)
AlignmentVThe internal memory size is given by (size()/AlignmentV + 1) * AlignmentV. AlignmentV must be a power of two. Best values or usually 4, 8 or 16, higher values are usually a waste of memory.
Examples:
structured-matrices.cpp.

Definition at line 415 of file forwards.h.

Member Typedef Documentation

template<class NumericT, unsigned int AlignmentV>
typedef viennacl::backend::mem_handle viennacl::toeplitz_matrix< NumericT, AlignmentV >::handle_type

Definition at line 46 of file toeplitz_matrix.hpp.

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

Definition at line 47 of file toeplitz_matrix.hpp.

Constructor & Destructor Documentation

template<class NumericT, unsigned int AlignmentV>
viennacl::toeplitz_matrix< NumericT, AlignmentV >::toeplitz_matrix ( )
inlineexplicit

The default constructor. Does not allocate any memory.

Definition at line 53 of file toeplitz_matrix.hpp.

template<class NumericT, unsigned int AlignmentV>
viennacl::toeplitz_matrix< NumericT, AlignmentV >::toeplitz_matrix ( vcl_size_t  rows,
vcl_size_t  cols 
)
inlineexplicit

Creates the matrix with the given size.

Parameters
rowsNumber of rows of the matrix
colsNumber of columns of the matrix

Definition at line 60 of file toeplitz_matrix.hpp.

Member Function Documentation

template<class NumericT, unsigned int AlignmentV>
viennacl::vector<NumericT, AlignmentV>& viennacl::toeplitz_matrix< NumericT, AlignmentV >::elements ( )
inline

Returns an internal viennacl::vector, which represents a Toeplitz matrix elements.

Definition at line 88 of file toeplitz_matrix.hpp.

template<class NumericT, unsigned int AlignmentV>
viennacl::vector<NumericT, AlignmentV> const& viennacl::toeplitz_matrix< NumericT, AlignmentV >::elements ( ) const
inline

Definition at line 89 of file toeplitz_matrix.hpp.

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

Returns the OpenCL handle.

Returns
OpenCL handle

Definition at line 82 of file toeplitz_matrix.hpp.

template<class NumericT, unsigned int AlignmentV>
vcl_size_t viennacl::toeplitz_matrix< NumericT, AlignmentV >::internal_size ( ) const
inline

Returns the internal size of matrix representtion. Usually required for launching OpenCL kernels only.

Returns
Internal size of matrix representation

Definition at line 107 of file toeplitz_matrix.hpp.

template<class NumericT, unsigned int AlignmentV>
entry_proxy<NumericT> viennacl::toeplitz_matrix< NumericT, AlignmentV >::operator() ( vcl_size_t  row_index,
vcl_size_t  col_index 
)
inline

Read-write access to a single element of the matrix.

Parameters
row_indexRow index of accessed element
col_indexColumn index of accessed element
Returns
Proxy for matrix entry

Definition at line 117 of file toeplitz_matrix.hpp.

template<class NumericT, unsigned int AlignmentV>
toeplitz_matrix<NumericT, AlignmentV>& viennacl::toeplitz_matrix< NumericT, AlignmentV >::operator+= ( toeplitz_matrix< NumericT, AlignmentV > &  that)
inline

+= operation for Toeplitz matrices

Parameters
thatMatrix which will be added
Returns
Result of addition

Definition at line 137 of file toeplitz_matrix.hpp.

template<class NumericT, unsigned int AlignmentV>
void viennacl::toeplitz_matrix< NumericT, AlignmentV >::resize ( vcl_size_t  sz,
bool  preserve = true 
)
inline

Resizes the matrix. Existing entries can be preserved.

Parameters
szNew size of matrix
preserveIf true, existing values are preserved.

Definition at line 73 of file toeplitz_matrix.hpp.

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

Returns the number of rows of the matrix.

Definition at line 95 of file toeplitz_matrix.hpp.

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

Returns the number of columns of the matrix.

Definition at line 100 of file toeplitz_matrix.hpp.


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