CSol
|
OpenCL linear algebra sparse matrix class. More...
#include <csol_la.h>
Public Member Functions | |
SparseMatrix (LinearAlgebra &, int) | |
SparseMatrix constructor. More... | |
SparseMatrix (LinearAlgebra &, const SparseMatrix &) | |
SparseMatrix copy constructor. More... | |
~SparseMatrix () | |
Vector | operator* (const Vector &) const |
SparseMatrix vector multiplication operator. More... | |
SparseMatrix & | operator= (const SparseMatrix &) |
SparseMatrix assignment operator. More... | |
void | reserve (int, int, int) |
SparseMatrix entry reservation. More... | |
void | write (REAL *) |
SparseMatrix write operation. More... | |
Public Member Functions inherited from Matrix | |
Matrix (LinearAlgebra &LA_) | |
~Matrix () | |
Additional Inherited Members | |
Protected Attributes inherited from Matrix | |
LinearAlgebra & | LA |
The sparse matrix class is in co-ordinate list format: [row(int)] [column(int)] [value(REAL)]
SparseMatrix | ( | LinearAlgebra & | LA_, |
int | nNonZeros_ | ||
) |
Empty sparse matrix constructor, values are set to zero.
LA_ | linear algebra instance handle. |
nNonZeros_ | number of non-zero entries in sparse matrix. |
SparseMatrix | ( | LinearAlgebra & | LA_, |
const SparseMatrix & | r_ | ||
) |
LA_ | linear algebra instance handle. |
r_ | sparse matrix to copy. |
|
inline |
SparseMatrix & operator= | ( | const SparseMatrix & | r_ | ) |
Copies sparse matrix values, matrices must be same dimensions.
r_ | sparse matrix to copy. |
void reserve | ( | int | i, |
int | j, | ||
int | index | ||
) |
Reserves a non-zero entry of row i and column j with an user-defined memory index value. The index is used to define the memory index location when copying the sparse matrix data values back from memory.
i | row. |
j | column. |
index | user-defined index. |
void write | ( | REAL * | v_ | ) |
Writes values from sparse matrix OpenCL buffer into memory. The memory locations for row i and column j is determined by the index value passed to the reserve function.
v_ | pointer to memory. |