clSPARSE  v0.10.0.0
a software library containing Sparse functions written in OpenCL
Public Attributes | List of all members
clsparseCsrMatrix Struct Reference

Structure to encapsulate sparse matrix data encoded in CSR form to clSPARSE API. More...

#include <clSPARSE-1x.h>

Public Attributes

void * meta
 
CSR matrix data
clsparseIdx_t num_rows
 
clsparseIdx_t num_cols
 
clsparseIdx_t num_nonzeros
 
OpenCL state
cl_mem values
 
cl_mem col_indices
 
cl_mem row_pointer
 
void * values
 
void * col_indices
 
void * row_pointer
 
Buffer offsets
clsparseIdx_t off_values
 
clsparseIdx_t off_col_indices
 
clsparseIdx_t off_row_pointer
 

Detailed Description

Structure to encapsulate sparse matrix data encoded in CSR form to clSPARSE API.

Note
The indices stored are 0-based
It is the users responsibility to allocate/deallocate OpenCL buffers
Examples:
sample-cg.cpp, and sample-spmv.cpp.

Member Data Documentation

void* clsparseCsrMatrix::col_indices

column index for corresponding value of size num_nonzeros

cl_mem clsparseCsrMatrix::col_indices

column index for corresponding value of size num_nonzeros

Examples:
sample-cg.cpp, and sample-spmv.cpp.
void * clsparseCsrMatrix::meta

Pointer to a private structure that contains meta-information the library keeps on a csr-encoded sparse matrix

clsparseIdx_t clsparseCsrMatrix::num_cols

Number of columns this matrix has if viewed as dense

Examples:
sample-cg.cpp, and sample-spmv.cpp.
clsparseIdx_t clsparseCsrMatrix::num_nonzeros

Number of values in matrix that are non-zero

Examples:
sample-cg.cpp, and sample-spmv.cpp.
clsparseIdx_t clsparseCsrMatrix::num_rows

Number of rows this matrix has if viewed as dense

Examples:
sample-cg.cpp, and sample-spmv.cpp.
clsparseIdx_t clsparseCsrMatrix::off_col_indices

Given that cl_mem objects are opaque without pointer arithmetic, these offsets are added to the cl_mem locations on device to define beginning of the data in the cl_mem buffers

clsparseIdx_t clsparseCsrMatrix::off_row_pointer

Given that cl_mem objects are opaque without pointer arithmetic, these offsets are added to the cl_mem locations on device to define beginning of the data in the cl_mem buffers

clsparseIdx_t clsparseCsrMatrix::off_values

Given that cl_mem objects are opaque without pointer arithmetic, these offsets are added to the cl_mem locations on device to define beginning of the data in the cl_mem buffers

void* clsparseCsrMatrix::row_pointer

Invariant: row_pointer[i+1]-row_pointer[i] = number of values in row i

cl_mem clsparseCsrMatrix::row_pointer

Invariant: row_pointer[i+1]-row_pointer[i] = number of values in row i

Examples:
sample-cg.cpp, and sample-spmv.cpp.
void* clsparseCsrMatrix::values

non-zero values in sparse matrix of size num_nonzeros

cl_mem clsparseCsrMatrix::values

non-zero values in sparse matrix of size num_nonzeros

Examples:
sample-cg.cpp, and sample-spmv.cpp.

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