ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hamilt::MatrixBlock< T > Struct Template Reference

A non-owning description of a matrix stored in memory. More...

#include <matrix_block.h>

Collaboration diagram for hamilt::MatrixBlock< T >:

Public Attributes

T * p
size_t row
size_t col
const int * desc

Detailed Description

template<typename T>
struct hamilt::MatrixBlock< T >

A non-owning description of a matrix stored in memory.

It records only where the matrix lives and how it is laid out: the data pointer, the local number of rows and columns, and the BLACS array descriptor when the matrix is block-cyclically distributed. It carries no physical meaning, so it can be shared between the code that fills a matrix and the code that diagonalizes it without either side depending on the other.

Note
This is an aggregate on purpose; several call sites brace-initialize it as MatrixBlock<T>{p, row, col, desc}.

MatrixBlock only describes a memory layout, so it now lives in source_base and eigensolvers can use it without including the Hamiltonian interface. This alias keeps the historical hamilt::MatrixBlock spelling working.

TODO: this header is a temporary compatibility shim. Once every call site spells the type as ModuleBase::MatrixBlock and includes source_base/matrix_block.h directly, delete this file.

Member Data Documentation

◆ col

template<typename T>
size_t ModuleBase::MatrixBlock< T >::col

◆ desc

template<typename T>
const int* ModuleBase::MatrixBlock< T >::desc

◆ p

template<typename T>
T* ModuleBase::MatrixBlock< T >::p

◆ row

template<typename T>
size_t ModuleBase::MatrixBlock< T >::row

The documentation for this struct was generated from the following file: