CSRMAT
This class is used to store sparse matrices as CSR data structure. It is composed by 3 vectors for row and column indices and for the data. More…
#include "CSRMAT.h"
Inherited by CSRMAT_CPU
Public Functions
| Name | |
|---|---|
| CSRMAT & | operator=(CSRMAT const & x) Copy operator. |
| virtual | ~CSRMAT() =0 Deletes the object. |
| virtual iExt * | get_ptr_iat_data() =0 Retrieves the pointer to the iat data. |
| virtual const iExt * | get_ptr_iat_data() const =0 |
| virtual iReg * | get_ptr_ja_data() =0 Retrieves the pointer to the ja data. |
| virtual const iReg * | get_ptr_ja_data() const =0 |
| virtual rExt * | get_ptr_coef_data() =0 Retrieves the pointer to the coef data. |
| virtual const rExt * | get_ptr_coef_data() const =0 |
| virtual void | overlap(iReg restrict nrows, iReg restrict ncols, iExt restrict nterm, iExt restrict iat, iReg restrict ja, rExt restrict coef) =0 Fills object assigning pointer. |
| virtual void | assign_nullptr() =0 Assign null pointer. |
| virtual void | resize(const iReg new_nrows, const iReg new_ncols, const iExt new_nterm) =0 Resize the object structure. |
| virtual void | copy(CSRMAT const & x) =0 |
| virtual void | MxV(const iReg nRHS, const rExt restrict x, rExt restrict b) =0 Multiplies the csrmat (A == this) by a vector x: Ax = b with b initialization. |
| virtual void | MxV_sum(const iReg nRHS, const rExt restrict x, rExt restrict b) =0 Multiplies the csrmat (A == this) by a vector x: b + Ax = b. |
| virtual void | MxM(CSRMAT & B, CSRMAT & C) =0 Multiplies the csrmat (A == this) by a csramt B: A x B = C. |
| virtual void | SymPatt(CSRMAT & MatPatt0, CSRMAT & MatSym) =0 Symmetrizes the Matrix pattern of ‘this’ adding null coefficients on MatPatt0 pattern. |
| virtual void | swap(CSRMAT & M) =0 Swap two CSRMAT objects. |
| iReg | get_nrows() const Retrieves the matrix number of rows. |
| iReg | get_ncols() const Retrieves the matrix number of columns. |
| iExt | get_nterm() const Retrieves the matrix number of stored terms. |
| void | set_nterm(iExt nterm_in) Sets the matrix number of stored terms. |
| virtual void | set_ncols(const iReg input_ncols) =0 Sets the number of columns. |
| void | reset_ncols(iReg new_ncols) Resets the number of column of a matrix. |
Protected Functions
| Name | |
|---|---|
| void | copy_CSRMAT(CSRMAT const & x) |
Protected Attributes
| Name | |
|---|---|
| iReg | nrows matrix number of rows. |
| iReg | ncols matrix number of columns. |
| iExt | nterm matrix number of stored terms. |
Detailed Description
class CSRMAT;
This class is used to store sparse matrices as CSR data structure. It is composed by 3 vectors for row and column indices and for the data.
class CSRMAT.
Public Functions Documentation
function operator=
CSRMAT & operator=(
CSRMAT const & x
)
Copy operator.
function ~CSRMAT
virtual ~CSRMAT() =0
Deletes the object.
function get_ptr_iat_data
virtual iExt * get_ptr_iat_data() =0
Retrieves the pointer to the iat data.
Reimplemented by: CSRMAT_CPU::get_ptr_iat_data
function get_ptr_iat_data
virtual const iExt * get_ptr_iat_data() const =0
Reimplemented by: CSRMAT_CPU::get_ptr_iat_data
function get_ptr_ja_data
virtual iReg * get_ptr_ja_data() =0
Retrieves the pointer to the ja data.
Reimplemented by: CSRMAT_CPU::get_ptr_ja_data
function get_ptr_ja_data
virtual const iReg * get_ptr_ja_data() const =0
Reimplemented by: CSRMAT_CPU::get_ptr_ja_data
function get_ptr_coef_data
virtual rExt * get_ptr_coef_data() =0
Retrieves the pointer to the coef data.
Reimplemented by: CSRMAT_CPU::get_ptr_coef_data
function get_ptr_coef_data
virtual const rExt * get_ptr_coef_data() const =0
Reimplemented by: CSRMAT_CPU::get_ptr_coef_data
function overlap
virtual void overlap(
iReg *__restrict__ nrows,
iReg *__restrict__ ncols,
iExt *__restrict__ nterm,
iExt *__restrict__ iat,
iReg *__restrict__ ja,
rExt *__restrict__ coef
) =0
Fills object assigning pointer.
Reimplemented by: CSRMAT_CPU::overlap
function assign_nullptr
virtual void assign_nullptr() =0
Assign null pointer.
Reimplemented by: CSRMAT_CPU::assign_nullptr
function resize
virtual void resize(
const iReg new_nrows,
const iReg new_ncols,
const iExt new_nterm
) =0
Resize the object structure.
Parameters:
- new_nrows new number of rows.
- new_ncols new number of columns.
- new_nterm new number of stored terms.
Reimplemented by: CSRMAT_CPU::resize
function copy
virtual void copy(
CSRMAT const & x
) =0
Reimplemented by: CSRMAT_CPU::copy
@ brief Copy.
function MxV
virtual void MxV(
const iReg nRHS,
const rExt *__restrict__ x,
rExt *__restrict__ b
) =0
Multiplies the csrmat (A == this) by a vector x: Ax = b with b initialization.
Reimplemented by: CSRMAT_CPU::MxV
function MxV_sum
virtual void MxV_sum(
const iReg nRHS,
const rExt *__restrict__ x,
rExt *__restrict__ b
) =0
Multiplies the csrmat (A == this) by a vector x: b + Ax = b.
Reimplemented by: CSRMAT_CPU::MxV_sum
function MxM
virtual void MxM(
CSRMAT & B,
CSRMAT & C
) =0
Multiplies the csrmat (A == this) by a csramt B: A x B = C.
Reimplemented by: CSRMAT_CPU::MxM
function SymPatt
virtual void SymPatt(
CSRMAT & MatPatt0,
CSRMAT & MatSym
) =0
Symmetrizes the Matrix pattern of ‘this’ adding null coefficients on MatPatt0 pattern.
Reimplemented by: CSRMAT_CPU::SymPatt
function swap
virtual void swap(
CSRMAT & M
) =0
Swap two CSRMAT objects.
Parameters:
- M CSRMAT to swap with ‘this’.
Reimplemented by: CSRMAT_CPU::swap
function get_nrows
iReg get_nrows() const
Retrieves the matrix number of rows.
function get_ncols
iReg get_ncols() const
Retrieves the matrix number of columns.
function get_nterm
iExt get_nterm() const
Retrieves the matrix number of stored terms.
function set_nterm
void set_nterm(
iExt nterm_in
)
Sets the matrix number of stored terms.
function set_ncols
virtual void set_ncols(
const iReg input_ncols
) =0
Sets the number of columns.
Reimplemented by: CSRMAT_CPU::set_ncols
function reset_ncols
void reset_ncols(
iReg new_ncols
)
Resets the number of column of a matrix.
Protected Functions Documentation
function copy_CSRMAT
void copy_CSRMAT(
CSRMAT const & x
)
@ brief CSRMAT members.
Protected Attributes Documentation
variable nrows
iReg nrows = 0;
matrix number of rows.
variable ncols
iReg ncols = 0;
matrix number of columns.
variable nterm
iExt nterm = 0;
matrix number of stored terms.
Updated on 19 November 2024 at 10:20:48 CET