|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Collective block algebra; only small coefficients cross the device boundary. More...
#include <linear_algebra.h>
Public Member Functions | |
| LinearAlgebra (const diag_comm_info &comm) | |
| std::size_t | storage_bytes (ct::DeviceType device) const |
| std::vector< Wide > | projection_cross (int ld, int dim, int nx, int ny, const T *x, const T *y) |
| Projection products and reductions in wavefunction precision; return double coefficients. | |
| std::vector< Wide > | arnoldi_dots (int ld, int dim, int bands, int count, int stride, const T *basis, const T *x) |
| Arnoldi products in wavefunction precision; use dots() for reliable norms. | |
| std::vector< Wide > | dots (int ld, int dim, int bands, int count, int stride, const T *basis, const T *x) |
| Products between corresponding bands and several Arnoldi blocks. | |
| ct::Tensor | dots_tensor (int ld, int dim, int bands, int count, int stride, const T *basis, const T *x) |
| std::vector< Wide > | cross (int ld, int dim, int nx, int ny, const T *x, const T *y) |
| Global X-adjoint times Y, with double accumulation for both precisions. | |
| ct::Tensor | cross_tensor (int ld, int dim, int nx, int ny, const T *x, const T *y) |
| ct::Tensor | cross_root_tensor (int ld, int dim, int nx, int ny, const T *x, const T *y) |
| std::vector< Wide > | gram (int ld, int dim, int bands, const T *input) |
| Global X-adjoint times X, reusing one FP64 conversion of the valid rows. | |
| ct::Tensor | gram_tensor (int ld, int dim, int bands, const T *input) |
| ct::Tensor | gram_root_tensor (int ld, int dim, int bands, const T *input) |
| void | expand (int ld, int dim, int nx, int ny, const T *x, const std::vector< Wide > &c, T *y, T beta) |
| Y = X*C + beta*Y, using a small host coefficient matrix. | |
| const T * | prepare_coefficients (const Wide *coefficients, const int64_t count) |
| Convert/upload host coefficients once for several block rotations. The borrowed Device pointer is invalidated by the next prepare_coefficients() or nonempty expand() on this object. expand_prepared() does not invalidate it. | |
| void | expand_prepared (int ld, int dim, int nx, int ny, const T *x, const T *c, T *y, T beta) |
| Y = X*C + beta*Y with already prepared Device coefficients (ld C = nx). X and Y must not overlap; C must contain at least nx*ny elements. | |
Private Types | |
| using | Wide = std::complex<double> |
Private Member Functions | |
| void | reduce (std::vector< Wide > *values) const |
| void | reduce (Wide *values, const int64_t count) const |
| void | cross_local_into (int ld, int dim, int nx, int ny, const T *x, const T *y, Wide *result) |
| void | gram_local_into (int ld, int dim, int bands, const T *input, Wide *result) |
Private Attributes | |
| const diag_comm_info | comm_ |
| ct::Tensor | products_ |
| ct::Tensor | coefficients_ |
| ct::Tensor | left_ |
| ct::Tensor | right_ |
| ct::Tensor | native_products_ |
Collective block algebra; only small coefficients cross the device boundary.
|
private |
|
inlineexplicit |
| std::vector< std::complex< double > > hsolver::LinearAlgebra< T, Device >::arnoldi_dots | ( | int | ld, |
| int | dim, | ||
| int | bands, | ||
| int | count, | ||
| int | stride, | ||
| const T * | basis, | ||
| const T * | x ) |
Arnoldi products in wavefunction precision; use dots() for reliable norms.
| std::vector< std::complex< double > > hsolver::LinearAlgebra< T, Device >::cross | ( | int | ld, |
| int | dim, | ||
| int | nx, | ||
| int | ny, | ||
| const T * | x, | ||
| const T * | y ) |
Global X-adjoint times Y, with double accumulation for both precisions.
|
private |
| ct::Tensor hsolver::LinearAlgebra< T, Device >::cross_root_tensor | ( | int | ld, |
| int | dim, | ||
| int | nx, | ||
| int | ny, | ||
| const T * | x, | ||
| const T * | y ) |
| ct::Tensor hsolver::LinearAlgebra< T, Device >::cross_tensor | ( | int | ld, |
| int | dim, | ||
| int | nx, | ||
| int | ny, | ||
| const T * | x, | ||
| const T * | y ) |
Host Tensor result; uses direct output storage for block projections.
| std::vector< std::complex< double > > hsolver::LinearAlgebra< T, Device >::dots | ( | int | ld, |
| int | dim, | ||
| int | bands, | ||
| int | count, | ||
| int | stride, | ||
| const T * | basis, | ||
| const T * | x ) |
Products between corresponding bands and several Arnoldi blocks.
| ct::Tensor hsolver::LinearAlgebra< T, Device >::dots_tensor | ( | int | ld, |
| int | dim, | ||
| int | bands, | ||
| int | count, | ||
| int | stride, | ||
| const T * | basis, | ||
| const T * | x ) |
| void hsolver::LinearAlgebra< T, Device >::expand | ( | int | ld, |
| int | dim, | ||
| int | nx, | ||
| int | ny, | ||
| const T * | x, | ||
| const std::vector< Wide > & | c, | ||
| T * | y, | ||
| T | beta ) |
Y = X*C + beta*Y, using a small host coefficient matrix.
| void hsolver::LinearAlgebra< T, Device >::expand_prepared | ( | int | ld, |
| int | dim, | ||
| int | nx, | ||
| int | ny, | ||
| const T * | x, | ||
| const T * | c, | ||
| T * | y, | ||
| T | beta ) |
Y = X*C + beta*Y with already prepared Device coefficients (ld C = nx). X and Y must not overlap; C must contain at least nx*ny elements.
| std::vector< std::complex< double > > hsolver::LinearAlgebra< T, Device >::gram | ( | int | ld, |
| int | dim, | ||
| int | bands, | ||
| const T * | input ) |
Global X-adjoint times X, reusing one FP64 conversion of the valid rows.
|
private |
| ct::Tensor hsolver::LinearAlgebra< T, Device >::gram_root_tensor | ( | int | ld, |
| int | dim, | ||
| int | bands, | ||
| const T * | input ) |
| ct::Tensor hsolver::LinearAlgebra< T, Device >::gram_tensor | ( | int | ld, |
| int | dim, | ||
| int | bands, | ||
| const T * | input ) |
| const T * hsolver::LinearAlgebra< T, Device >::prepare_coefficients | ( | const Wide * | coefficients, |
| const int64_t | count ) |
Convert/upload host coefficients once for several block rotations. The borrowed Device pointer is invalidated by the next prepare_coefficients() or nonempty expand() on this object. expand_prepared() does not invalidate it.
| std::vector< std::complex< double > > hsolver::LinearAlgebra< T, Device >::projection_cross | ( | int | ld, |
| int | dim, | ||
| int | nx, | ||
| int | ny, | ||
| const T * | x, | ||
| const T * | y ) |
Projection products and reductions in wavefunction precision; return double coefficients.
|
private |
|
private |
| std::size_t hsolver::LinearAlgebra< T, Device >::storage_bytes | ( | ct::DeviceType | device | ) | const |
Owned reusable storage only; excludes returned vectors and borrowed views.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |