XGCa
|
#include <matrix.hpp>
Public Member Functions | |
Matrix () | |
Matrix (int m_in, int n_in, int w_in) | |
Matrix (int m_in, int n_in, int w_in, int nnz_in, bool is_csr_in, int *csr_ridx_or_eindex, int *csr_cidx_or_nelement, double *values) | |
void | mult_org (const Kokkos::View< double *, Kokkos::LayoutRight, Device > &x, const Kokkos::View< double *, Kokkos::LayoutRight, Device > &y) const |
void | mult_csr (const Kokkos::View< double *, Kokkos::LayoutRight, Device > &x, const Kokkos::View< double *, Kokkos::LayoutRight, Device > &y) const |
void | mult_tensor_org (const Kokkos::View< double **, Kokkos::LayoutRight, Device > &x, const Kokkos::View< double **, Kokkos::LayoutRight, Device > &y) const |
void | mult_tensor_csr (const Kokkos::View< double **, Kokkos::LayoutRight, Device > &x, const Kokkos::View< double **, Kokkos::LayoutRight, Device > &y) const |
void | mult (const Kokkos::View< double *, Kokkos::LayoutRight, Device > &x, const Kokkos::View< double *, Kokkos::LayoutRight, Device > &y) const |
void | mult_tensor (const Kokkos::View< double **, Kokkos::LayoutRight, Device > &x, const Kokkos::View< double **, Kokkos::LayoutRight, Device > &y) const |
Private Types | |
enum | SetValueOpt { Replace =0, Add =1 } |
using | exspace = typename Device::execution_space |
Use execution space where matrix views are allocated. More... | |
Private Attributes | |
int | m |
of rows (size of each column)More... | |
int | n |
of columns (size of each row)More... | |
int | width |
Kokkos::View< double **, Kokkos::LayoutRight, Device > | value |
matrix value More... | |
Kokkos::View< int **, Kokkos::LayoutRight, Device > | eindex |
column index - 1-indexed!! More... | |
Kokkos::View< int *, Kokkos::LayoutRight, Device > | nelement |
of non-zero element of each rowMore... | |
bool | is_csr |
Whether the matrix is in CSR format. More... | |
int | nnz |
if in CSR format, number of (nonzero) values More... | |
Kokkos::View< int *, Kokkos::LayoutRight, Device > | csr_ridx |
row index for CSR - m+1 More... | |
Kokkos::View< double *, Kokkos::LayoutRight, Device > | csr_v |
value of CSR - nnz More... | |
Kokkos::View< int *, Kokkos::LayoutRight, Device > | csr_cidx |
columun index - nnz More... | |
Use execution space where matrix views are allocated.
|
private |
Constructor that allocates the original format
[in] | m_in | is the # of rows |
[in] | n_in | is the # of columns |
[in] | w_in | is the width you think you will need (youll get an error later if its too small) |
|
inline |
Constructor that deep copies the matrix from pointers (to copy from Fortran mat_type)
[in] | m_in | is the # of rows |
[in] | n_in | is the # of columns |
[in] | w_in | is the width you think you will need (youll get an error later if its too small) |
[in] | nnz_in | is the number of nonzero entries |
[in] | is_csr_in | is whether the matrix is in CSR format |
[in] | csr_ridx_or_eindex | points to csr_ridx if in CSR, otherwise to eindex |
[in] | csr_cidx_or_nelement | points to csr_cidx if in CSR, otherwise to nelement |
[in] | values | is the pointer to the matrix entries |
|
inline |
Matrix multiplication of the form: y = Ax. Dispatch for the two matrix formats
[in] | x | is the input vector |
[out] | y | is the result |
|
inline |
|
inline |
|
inline |
Matrix multiplication using the transpose, i.e.: y = A^T x. Dispatch for the two matrix formats
[in] | x | is the input vector |
[out] | y | is the result |
[in] | x | is the input tensor |
[out] | y | is the result |
|
inline |
|
inline |
|
private |
columun index - nnz
|
private |
row index for CSR - m+1
|
private |
value of CSR - nnz
|
private |
column index - 1-indexed!!
|
private |
Whether the matrix is in CSR format.
|
private |
|
private |
|
private |
|
private |
if in CSR format, number of (nonzero) values
|
private |
matrix value
|
private |