ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
matrix_block_ops.h
Go to the documentation of this file.
1#ifndef HSOLVER_MATRIX_BLOCK_OPS_H
2#define HSOLVER_MATRIX_BLOCK_OPS_H
3
4namespace ModuleBase
5{
6template <typename T> struct MatrixBlock;
7}
8
9namespace hsolver
10{
11// Operands use column-major host storage. Null descriptors select local BLAS.
12// Distributed operands must satisfy the corresponding PBLAS alignment rules.
13
14// C = op(A) op(B) for the leading subblocks of the given dimensions.
15template <typename T>
16void multiply_matrix_blocks(char transa, char transb, int m, int n, int k,
17 const ModuleBase::MatrixBlock<T>& a,
18 const ModuleBase::MatrixBlock<T>& b,
19 const ModuleBase::MatrixBlock<T>& c);
20
21// C = A B, where A is m by m Hermitian and only its upper triangle is read.
22template <typename T>
23void multiply_hermitian_upper(int m, int n,
24 const ModuleBase::MatrixBlock<T>& a,
25 const ModuleBase::MatrixBlock<T>& b,
26 const ModuleBase::MatrixBlock<T>& c);
27
28// Reconstruct a Hermitian matrix from the source's upper triangle.
29// Source and destination must be distinct and have the same block-cyclic layout.
30template <typename T>
31void copy_hermitian_upper(int order,
32 const ModuleBase::MatrixBlock<T>& source,
33 const ModuleBase::MatrixBlock<T>& target);
34} // namespace hsolver
35
36#endif
Definition clebsch_gordan_coeff.cpp:8
Definition dense_eigensolver.cpp:23
void copy_hermitian_upper(int order, const ModuleBase::MatrixBlock< T > &source, const ModuleBase::MatrixBlock< T > &target)
Definition matrix_block_ops.cpp:49
void multiply_hermitian_upper(int m, int n, const ModuleBase::MatrixBlock< T > &a, const ModuleBase::MatrixBlock< T > &b, const ModuleBase::MatrixBlock< T > &c)
Definition matrix_block_ops.cpp:33
void multiply_matrix_blocks(char transa, char transb, int m, int n, int k, const ModuleBase::MatrixBlock< T > &a, const ModuleBase::MatrixBlock< T > &b, const ModuleBase::MatrixBlock< T > &c)
Definition matrix_block_ops.cpp:15
A non-owning description of a matrix stored in memory.
Definition matrix_block.h:23