KASKADE 7 development version
|
A NUMA-aware compressed row storage sparsity pattern. More...
#include <threadedMatrix.hh>
A NUMA-aware compressed row storage sparsity pattern.
Index | integral type for row/column indices |
Definition at line 1847 of file threadedMatrix.hh.
Public Member Functions | |
NumaCRSPattern () | |
Constructs an empty 0x0 pattern. More... | |
NumaCRSPattern (NumaCRSPatternCreator< Index > const &creator) | |
Constructor creating a sparsity pattern from the given creator. More... | |
template<class Expanded , class Condensed , class Matrix > | |
NumaCRSPattern (Expanded const &eIndices, Condensed const &cIndices, Matrix const &mat) | |
Constructor. More... | |
template<class Matrix > | |
NumaCRSPattern (Matrix const &matrix, bool isSymmetric, bool isTransposed, bool symmetric) | |
Constructor extracting the sparsity pattern of a given matrix (usually a Dune::BCRSMatrix). More... | |
Index | N () const |
The number of rows. More... | |
Index | M () const |
The number of columns. More... | |
size_t | storage () const |
Returns the number of stored entries. More... | |
size_t | nonzeroes () const |
Returns the number of structurally nonzero entries. More... | |
int | nodes () const |
Returns the number of NUMA nodes/chunks used. More... | |
std::shared_ptr< ChunkPattern > | pattern (int i) const |
Returns the individual patterns. More... | |
bool | isSymmetric () const |
Returns the symmetry status of the pattern. More... | |
int | chunk (Index row) const |
Returns the number of the chunk containing the given row. More... | |
std::vector< Index > const & | rowStart () const |
Returns the limiting row indices between the chunks. More... | |
bool | exists (Index r, Index c) const |
queries whether an entry is present in the sparsity pattern More... | |
|
inline |
Constructs an empty 0x0 pattern.
Definition at line 1856 of file threadedMatrix.hh.
|
inline |
Constructor creating a sparsity pattern from the given creator.
Definition at line 1863 of file threadedMatrix.hh.
|
inline |
Constructor.
This works like Matlab A(idx,idx), where idx is given by eIndices.
Expanded | an array type with value type convertible to Index |
Condensed | an array type with value type convertible to Index |
eIndices | sorted global array of expanded indices |
cIndices | sorted global array of condensed indices |
mat | a matrix with BCRSMatrix interface |
Definition at line 1888 of file threadedMatrix.hh.
|
inline |
Constructor extracting the sparsity pattern of a given matrix (usually a Dune::BCRSMatrix).
Matrix | the type of the supplied matrix to copy |
matrix | the matrix to be copied |
isSymmetric | whether the supplied matrix is symmetric |
isTransposed | whether the supplied matrix is transposed |
symmetric | whether only the lower triangular part should be stored |
This copies the sparsity pattern of the provided Dune ISTL matrix. The number of chunks created is the number of NUMA nodes as reported by the NumaThreadPool.
Note that !isSymmetric && symmetric is highly questionable and hence not allowed.
Definition at line 1923 of file threadedMatrix.hh.
|
inline |
Returns the number of the chunk containing the given row.
row | the index of the row in the range [0,N] |
For row==N, the total number of chunks is returned (i.e. one behind the last chunk).
Definition at line 2003 of file threadedMatrix.hh.
Referenced by Kaskade::NumaCRSPattern< Index >::exists().
|
inline |
queries whether an entry is present in the sparsity pattern
Definition at line 2024 of file threadedMatrix.hh.
|
inline |
Returns the symmetry status of the pattern.
If true, the matrix is symmetric, and only the lower triangular entries are actually stored.
Definition at line 1995 of file threadedMatrix.hh.
Referenced by Kaskade::NumaCRSPattern< Index >::NumaCRSPattern(), and Kaskade::operator+().
|
inline |
The number of columns.
Definition at line 1954 of file threadedMatrix.hh.
Referenced by Kaskade::operator+().
|
inline |
The number of rows.
Definition at line 1949 of file threadedMatrix.hh.
Referenced by Kaskade::NumaCRSPattern< Index >::chunk(), and Kaskade::operator+().
|
inline |
Returns the number of NUMA nodes/chunks used.
Definition at line 1983 of file threadedMatrix.hh.
Referenced by Kaskade::NumaCRSPattern< Index >::NumaCRSPattern(), and Kaskade::operator+().
|
inline |
Returns the number of structurally nonzero entries.
Definition at line 1972 of file threadedMatrix.hh.
Referenced by Kaskade::operator+().
|
inline |
Returns the individual patterns.
Definition at line 1988 of file threadedMatrix.hh.
Referenced by Kaskade::operator+().
|
inline |
Returns the limiting row indices between the chunks.
For \( 0\le i < n \), the chunk \( i \) contains the rows in the half-open range [ rowStart()[i], rowStart()[i+1] [.
Definition at line 2019 of file threadedMatrix.hh.
|
inline |
Returns the number of stored entries.
This differs from nonzeroes() for symmetric storage.
Definition at line 1961 of file threadedMatrix.hh.