ViennaCL - The Vienna Computing Library
1.5.0
|
A Toeplitz matrix class. More...
#include <toeplitz_matrix.hpp>
Public Types | |
typedef viennacl::backend::mem_handle | handle_type |
typedef scalar< typename viennacl::tools::CHECK_SCALAR_TEMPLATE_ARGUMENT < SCALARTYPE >::ResultType > | value_type |
Public Member Functions | |
toeplitz_matrix () | |
The default constructor. Does not allocate any memory. | |
toeplitz_matrix (vcl_size_t rows, vcl_size_t cols) | |
Creates the matrix with the given size. | |
void | resize (vcl_size_t sz, bool preserve=true) |
Resizes the matrix. Existing entries can be preserved. | |
handle_type const & | handle () const |
Returns the OpenCL handle. | |
viennacl::vector< SCALARTYPE, ALIGNMENT > & | elements () |
Returns an internal viennacl::vector, which represents a Toeplitz matrix elements. | |
viennacl::vector< SCALARTYPE, ALIGNMENT > const & | elements () const |
vcl_size_t | size1 () const |
Returns the number of rows of the matrix. | |
vcl_size_t | size2 () const |
Returns the number of columns of the matrix. | |
vcl_size_t | internal_size () const |
Returns the internal size of matrix representtion. Usually required for launching OpenCL kernels only. | |
entry_proxy< SCALARTYPE > | operator() (vcl_size_t row_index, vcl_size_t col_index) |
Read-write access to a single element of the matrix. | |
toeplitz_matrix< SCALARTYPE, ALIGNMENT > & | operator+= (toeplitz_matrix< SCALARTYPE, ALIGNMENT > &that) |
+= operation for Toeplitz matrices |
A Toeplitz matrix class.
SCALARTYPE | The underlying scalar type (either float or double) |
ALIGNMENT | The internal memory size is given by (size()/ALIGNMENT + 1) * ALIGNMENT. ALIGNMENT must be a power of two. Best values or usually 4, 8 or 16, higher values are usually a waste of memory. |
typedef scalar<typename viennacl::tools::CHECK_SCALAR_TEMPLATE_ARGUMENT<SCALARTYPE>::ResultType> value_type |
toeplitz_matrix | ( | ) | [inline, explicit] |
The default constructor. Does not allocate any memory.
toeplitz_matrix | ( | vcl_size_t | rows, |
vcl_size_t | cols | ||
) | [inline, explicit] |
Creates the matrix with the given size.
rows | Number of rows of the matrix |
cols | Number of columns of the matrix |
viennacl::vector<SCALARTYPE, ALIGNMENT>& elements | ( | ) | [inline] |
Returns an internal viennacl::vector, which represents a Toeplitz matrix elements.
viennacl::vector<SCALARTYPE, ALIGNMENT> const& elements | ( | ) | const [inline] |
handle_type const& handle | ( | ) | const [inline] |
Returns the OpenCL handle.
vcl_size_t internal_size | ( | ) | const [inline] |
Returns the internal size of matrix representtion. Usually required for launching OpenCL kernels only.
entry_proxy<SCALARTYPE> operator() | ( | vcl_size_t | row_index, |
vcl_size_t | col_index | ||
) | [inline] |
Read-write access to a single element of the matrix.
row_index | Row index of accessed element |
col_index | Column index of accessed element |
toeplitz_matrix<SCALARTYPE, ALIGNMENT>& operator+= | ( | toeplitz_matrix< SCALARTYPE, ALIGNMENT > & | that | ) | [inline] |
+= operation for Toeplitz matrices
that | Matrix which will be added |
void resize | ( | vcl_size_t | sz, |
bool | preserve = true |
||
) | [inline] |
Resizes the matrix. Existing entries can be preserved.
sz | New size of matrix |
preserve | If true, existing values are preserved. |
vcl_size_t size1 | ( | ) | const [inline] |
Returns the number of rows of the matrix.
vcl_size_t size2 | ( | ) | const [inline] |
Returns the number of columns of the matrix.