![]() |
KASKADE 7 development version
|
A NUMA-aware compressed row storage sparsity pattern. More...
#include <threadedMatrix.hh>
Public Member Functions | |
| NumaCRSPattern () | |
| Constructs an empty 0x0 pattern. | |
| Index | N () const |
| The number of rows. | |
| Index | M () const |
| The number of columns. | |
| size_t | storage () const |
| Returns the number of stored entries. | |
| size_t | nonzeroes () const |
| Returns the number of structurally nonzero entries. | |
| int | nodes () const |
| Returns the number of NUMA nodes/chunks used. | |
| std::shared_ptr< ChunkPattern > | pattern (int i) const |
| Returns the individual pattern of chunk i. | |
| bool | isSymmetric () const |
| Returns the symmetry status of the pattern. | |
| int | chunk (Index row) const |
| Returns the number of the chunk containing the given row. | |
| std::vector< Index > const & | rowStart () const |
| Returns the limiting row indices between the chunks. | |
| bool | exists (Index r, Index c) const |
| queries whether an entry is present in the sparsity pattern | |
Constructors | |
| template<class IndexA> | |
| NumaCRSPattern (NumaCRSPattern< IndexA > const &p) | |
| Copy constructor. | |
| NumaCRSPattern (NumaCRSPatternCreator< Index > const &creator) | |
| Constructor creating a sparsity pattern from the given creator. | |
| template<class Expanded, class Condensed, class Matrix> | |
| NumaCRSPattern (Expanded const &eIndices, Condensed const &cIndices, Matrix const &mat) | |
| Constructor. | |
| 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). | |
A NUMA-aware compressed row storage sparsity pattern.
| Index | integral type for row/column indices |
Definition at line 623 of file threadedMatrix.hh.
|
inline |
Constructs an empty 0x0 pattern.
Definition at line 632 of file threadedMatrix.hh.
Referenced by NumaCRSPattern(), and NumaCRSPattern().
|
inline |
Copy constructor.
Definition at line 645 of file threadedMatrix.hh.
|
inline |
Constructor creating a sparsity pattern from the given creator.
Definition at line 658 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 683 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 719 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 806 of file threadedMatrix.hh.
Referenced by exists().
|
inline |
queries whether an entry is present in the sparsity pattern
Definition at line 827 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 798 of file threadedMatrix.hh.
Referenced by NumaCRSPattern(), NumaCRSPattern(), NumaCRSPattern(), and Kaskade::operator+().
|
inline |
The number of columns.
Definition at line 754 of file threadedMatrix.hh.
Referenced by NumaCRSPattern(), NumaCRSPattern(), and Kaskade::operator+().
|
inline |
The number of rows.
Definition at line 749 of file threadedMatrix.hh.
Referenced by chunk(), NumaCRSPattern(), and Kaskade::operator+().
|
inline |
Returns the number of NUMA nodes/chunks used.
Definition at line 783 of file threadedMatrix.hh.
Referenced by NumaCRSPattern(), NumaCRSPattern(), NumaCRSPattern(), NumaCRSPattern(), and Kaskade::operator+().
|
inline |
Returns the number of structurally nonzero entries.
Definition at line 772 of file threadedMatrix.hh.
Referenced by Kaskade::operator+().
|
inline |
Returns the individual pattern of chunk i.
Definition at line 788 of file threadedMatrix.hh.
Referenced by NumaCRSPattern(), and 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 822 of file threadedMatrix.hh.
Referenced by NumaCRSPattern().
|
inline |
Returns the number of stored entries.
This differs from nonzeroes() for symmetric storage.
Definition at line 761 of file threadedMatrix.hh.