A sparse square matrix in compressed sparse rows format optimized for the case that only a few rows carry nonzero entries.
More...
|
| compressed_compressed_matrix () |
| Default construction of a compressed matrix. No memory is allocated. More...
|
|
| compressed_compressed_matrix (vcl_size_t rows, vcl_size_t cols, vcl_size_t nonzero_rows=0, vcl_size_t nonzeros=0, viennacl::context ctx=viennacl::context()) |
| Construction of a compressed matrix with the supplied number of rows and columns. If the number of nonzeros is positive, memory is allocated. More...
|
|
| compressed_compressed_matrix (vcl_size_t rows, vcl_size_t cols, viennacl::context ctx) |
| Construction of a compressed matrix with the supplied number of rows and columns. If the number of nonzeros is positive, memory is allocated. More...
|
|
| compressed_compressed_matrix (viennacl::context ctx) |
|
compressed_compressed_matrix & | operator= (compressed_compressed_matrix const &other) |
| Assignment a compressed matrix from possibly another memory domain. More...
|
|
void | set (const void *row_jumper, const void *row_indices, const void *col_buffer, const SCALARTYPE *elements, vcl_size_t rows, vcl_size_t cols, vcl_size_t nonzero_rows, vcl_size_t nonzeros) |
| Sets the row, column and value arrays of the compressed matrix. More...
|
|
const vcl_size_t & | size1 () const |
| Returns the number of rows. More...
|
|
const vcl_size_t & | size2 () const |
| Returns the number of columns. More...
|
|
const vcl_size_t & | nnz1 () const |
| Returns the number of nonzero entries. More...
|
|
const vcl_size_t & | nnz () const |
| Returns the number of nonzero entries. More...
|
|
const handle_type & | handle1 () const |
| Returns the OpenCL handle to the row index array. More...
|
|
const handle_type & | handle2 () const |
| Returns the OpenCL handle to the column index array. More...
|
|
const handle_type & | handle3 () const |
| Returns the OpenCL handle to the row index array. More...
|
|
const handle_type & | handle () const |
| Returns the OpenCL handle to the matrix entry array. More...
|
|
handle_type & | handle1 () |
| Returns the OpenCL handle to the row index array. More...
|
|
handle_type & | handle2 () |
| Returns the OpenCL handle to the column index array. More...
|
|
handle_type & | handle3 () |
| Returns the OpenCL handle to the row index array. More...
|
|
handle_type & | handle () |
| Returns the OpenCL handle to the matrix entry array. More...
|
|
void | switch_memory_context (viennacl::context new_ctx) |
|
viennacl::memory_types | memory_context () const |
|
template<class SCALARTYPE>
class viennacl::compressed_compressed_matrix< SCALARTYPE >
A sparse square matrix in compressed sparse rows format optimized for the case that only a few rows carry nonzero entries.
The difference to the 'standard' CSR format is that there is an additional array 'row_indices' so that the i-th set of indices in the CSR-layout refers to row_indices[i].
- Template Parameters
-
SCALARTYPE | The floating point type (either float or double, checked at compile time) |
ALIGNMENT | The internal memory size for the entries in each row 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. |