|
votca 2026-dev
|
A real symmetric n x n matrix stored as the tiles of its lower triangle (about half the memory of the dense matrix). More...
#include <symmetric_tiles.h>

Public Member Functions | |
| SymmetricTiles ()=default | |
| void | Allocate (Index n, Index kind, Index tile=DefaultTile) |
| void | Release () |
| bool | allocated () const |
| bool | built () const |
| Index | size () const |
| Index | kind () const |
| void | SetRowLower (Index r, const double *values) |
| Row r, columns 0..r (values[0..r]); rows may be set in parallel. | |
| void | FinishBuild () |
| Fills the upper halves of the diagonal tiles; marks the matrix built. | |
| Eigen::MatrixXd | Multiply (const Eigen::MatrixXd &X, double factor=1.0) const |
| factor * S * X | |
| double | operator() (Index i, Index j) const |
| Element (i, j), for tests. | |
Static Public Member Functions | |
| static double | Bytes (Index n, Index tile=DefaultTile) |
| Bytes the tiles of an n x n matrix need. | |
Static Public Attributes | |
| static constexpr Index | DefaultTile = 1024 |
Private Types | |
| using | RowMajorMap |
| using | ConstRowMajorMap |
Private Member Functions | |
| Index | TileStart (Index I) const |
| Index | TileSize (Index I) const |
| double * | TileData (Index I, Index J) const |
Private Attributes | |
| Index | n_ = 0 |
| Index | tile_ = DefaultTile |
| Index | ntiles_ = 0 |
| Index | kind_ = 0 |
| bool | built_ = false |
| std::vector< std::size_t > | offset_ |
| std::unique_ptr< double[]> | data_ |
A real symmetric n x n matrix stored as the tiles of its lower triangle (about half the memory of the dense matrix).
The tiles (I, J), I >= J, are tile x tile blocks (smaller at the end), row-major, so that a row segment within a tile is contiguous. The diagonal tiles are stored in full. Rows are written with SetRowLower, which takes the columns 0..r of row r; FinishBuild() then fills the upper halves of the diagonal tiles.
Multiply(X) gives S X with the tiles of the lower triangle and their transposes, one row block of the result per task.
Definition at line 48 of file symmetric_tiles.h.
|
private |
Definition at line 81 of file symmetric_tiles.h.
|
private |
Definition at line 79 of file symmetric_tiles.h.
|
default |
| void votca::xtp::SymmetricTiles::Allocate | ( | Index | n, |
| Index | kind, | ||
| Index | tile = DefaultTile ) |
Allocates (uninitialised) storage for an n x n matrix; kind is a tag of what the matrix holds, checked by users that share it.
Definition at line 47 of file symmetric_tiles.cc.
|
inline |
Definition at line 62 of file symmetric_tiles.h.
|
inline |
Definition at line 63 of file symmetric_tiles.h.
|
static |
Bytes the tiles of an n x n matrix need.
Definition at line 31 of file symmetric_tiles.cc.
| void votca::xtp::SymmetricTiles::FinishBuild | ( | ) |
Fills the upper halves of the diagonal tiles; marks the matrix built.
Definition at line 88 of file symmetric_tiles.cc.
|
inline |
Definition at line 65 of file symmetric_tiles.h.
| Eigen::MatrixXd votca::xtp::SymmetricTiles::Multiply | ( | const Eigen::MatrixXd & | X, |
| double | factor = 1.0 ) const |
factor * S * X
Definition at line 97 of file symmetric_tiles.cc.
Element (i, j), for tests.
Definition at line 129 of file symmetric_tiles.cc.
| void votca::xtp::SymmetricTiles::Release | ( | ) |
Definition at line 69 of file symmetric_tiles.cc.
| void votca::xtp::SymmetricTiles::SetRowLower | ( | Index | r, |
| const double * | values ) |
Row r, columns 0..r (values[0..r]); rows may be set in parallel.
Definition at line 77 of file symmetric_tiles.cc.
|
inline |
Definition at line 64 of file symmetric_tiles.h.
Definition at line 87 of file symmetric_tiles.h.
Definition at line 86 of file symmetric_tiles.h.
Definition at line 85 of file symmetric_tiles.h.
|
private |
Definition at line 95 of file symmetric_tiles.h.
|
private |
Definition at line 97 of file symmetric_tiles.h.
|
staticconstexpr |
Definition at line 50 of file symmetric_tiles.h.
|
private |
Definition at line 94 of file symmetric_tiles.h.
|
private |
Definition at line 91 of file symmetric_tiles.h.
|
private |
Definition at line 93 of file symmetric_tiles.h.
|
private |
Definition at line 96 of file symmetric_tiles.h.
|
private |
Definition at line 92 of file symmetric_tiles.h.