ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hsolver::linear_op< T, Device > Class Template Reference

Elementwise operations; pointers and dot outputs belong to Device. More...

#include <linear_op.h>

Collaboration diagram for hsolver::linear_op< T, Device >:

Public Member Functions

void combine (int ld, int dim, int nvec, int count, int stride, const T *basis, const T *coefficients, T *output) const
 Add per-band linear combinations of Krylov columns; coefficients are column-major blocks.
void scatter (int ld, int dim, int nvec, const T *input, T *output, const int *map) const
 Scatter packed columns to distinct original-band destinations.
void block_gram (int ld, int dim, int nvec, int count, int stride, const T *basis, std::complex< double > *output) const
 Per-band Krylov Gram matrices in double precision, indexed as (column * count + row) * nvec + band.
void gmres_update (int ld, int dim, int nvec, T *solution, T *residual, const T *direction, const T *image, const T *coefficients) const
 Skip zero-coefficient columns; a null residual disables the paired residual update.
void native_dots (int ld, int dim, int nvec, int count, int stride, const T *basis, const T *x, T *out) const
 Batched products accumulated in wavefunction precision.
void wide_dots (int ld, int dim, int nvec, int count, int stride, const T *basis, const T *x, std::complex< double > *out) const
 Batched products accumulated in double precision.
void diagonal (int ld, int dim, int nvec, const T *inverse, const T *x, T *y) const
 Apply the same inverse diagonal to every column.
void cgs_direction (int ld, int dim, int nvec, T *p, T *u, const T *r, const T *q, const T *beta) const
 Fused CGS search direction, alpha step, and final updates.
void cgs_alpha (int ld, int dim, int nvec, T *q, T *direction, const T *u, const T *v, const T *alpha) const
void cgs_finish (int ld, int dim, int nvec, T *x, T *r, const T *direction, const T *ad, const T *alpha) const
void batch (int ld, int dim, int nvec, T *out, const T *x, const T *y, T a, T b, const T *ca, const T *cb, const int *skip) const
 Batched updates with optional device coefficients and skip mask.
void dots (int ld, int dim, int nvec, const T *x, const T *y, const T *z, const T *w, T *out, T *partial, int tiles) const
 One or two inner products using caller-owned partial sums.
void swaps (int ld, int dim, int slots, int stride, int count, T *vectors, const int *pairs) const
 Apply an ordered list of column swaps to all vector slots.
void bicg_update (int ld, int dim, int nvec, bool direction, T *out, const T *x, const T *y, const T *a, const T *b) const
 Fuse the two BiCGSTAB direction or solution updates.
void gather (int ld, int dim, int nvec, int slots, int stride, const T *in, T *out, const int *map) const
 Gather columns using a device destination-to-source map.
void dot (const int ld, const int dim, const int nvec, const T *x, const T *y, T *out) const

Detailed Description

template<typename T, typename Device>
class hsolver::linear_op< T, Device >

Elementwise operations; pointers and dot outputs belong to Device.

Member Function Documentation

◆ batch()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::batch ( int ld,
int dim,
int nvec,
T * out,
const T * x,
const T * y,
T a,
T b,
const T * ca,
const T * cb,
const int * skip ) const

Batched updates with optional device coefficients and skip mask.

Here is the caller graph for this function:

◆ bicg_update()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::bicg_update ( int ld,
int dim,
int nvec,
bool direction,
T * out,
const T * x,
const T * y,
const T * a,
const T * b ) const

Fuse the two BiCGSTAB direction or solution updates.

Here is the caller graph for this function:

◆ block_gram()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::block_gram ( int ld,
int dim,
int nvec,
int count,
int stride,
const T * basis,
std::complex< double > * output ) const

Per-band Krylov Gram matrices in double precision, indexed as (column * count + row) * nvec + band.

Here is the caller graph for this function:

◆ cgs_alpha()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::cgs_alpha ( int ld,
int dim,
int nvec,
T * q,
T * direction,
const T * u,
const T * v,
const T * alpha ) const
Here is the caller graph for this function:

◆ cgs_direction()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::cgs_direction ( int ld,
int dim,
int nvec,
T * p,
T * u,
const T * r,
const T * q,
const T * beta ) const

Fused CGS search direction, alpha step, and final updates.

Here is the caller graph for this function:

◆ cgs_finish()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::cgs_finish ( int ld,
int dim,
int nvec,
T * x,
T * r,
const T * direction,
const T * ad,
const T * alpha ) const
Here is the caller graph for this function:

◆ combine()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::combine ( int ld,
int dim,
int nvec,
int count,
int stride,
const T * basis,
const T * coefficients,
T * output ) const

Add per-band linear combinations of Krylov columns; coefficients are column-major blocks.

Here is the caller graph for this function:

◆ diagonal()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::diagonal ( int ld,
int dim,
int nvec,
const T * inverse,
const T * x,
T * y ) const

Apply the same inverse diagonal to every column.

Here is the caller graph for this function:

◆ dot()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::dot ( const int ld,
const int dim,
const int nvec,
const T * x,
const T * y,
T * out ) const

◆ dots()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::dots ( int ld,
int dim,
int nvec,
const T * x,
const T * y,
const T * z,
const T * w,
T * out,
T * partial,
int tiles ) const

One or two inner products using caller-owned partial sums.

Here is the caller graph for this function:

◆ gather()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::gather ( int ld,
int dim,
int nvec,
int slots,
int stride,
const T * in,
T * out,
const int * map ) const

Gather columns using a device destination-to-source map.

Here is the caller graph for this function:

◆ gmres_update()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::gmres_update ( int ld,
int dim,
int nvec,
T * solution,
T * residual,
const T * direction,
const T * image,
const T * coefficients ) const

Skip zero-coefficient columns; a null residual disables the paired residual update.

Here is the caller graph for this function:

◆ native_dots()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::native_dots ( int ld,
int dim,
int nvec,
int count,
int stride,
const T * basis,
const T * x,
T * out ) const

Batched products accumulated in wavefunction precision.

Here is the caller graph for this function:

◆ scatter()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::scatter ( int ld,
int dim,
int nvec,
const T * input,
T * output,
const int * map ) const

Scatter packed columns to distinct original-band destinations.

Here is the caller graph for this function:

◆ swaps()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::swaps ( int ld,
int dim,
int slots,
int stride,
int count,
T * vectors,
const int * pairs ) const

Apply an ordered list of column swaps to all vector slots.

Here is the caller graph for this function:

◆ wide_dots()

template<typename T, typename Device>
void hsolver::linear_op< T, Device >::wide_dots ( int ld,
int dim,
int nvec,
int count,
int stride,
const T * basis,
const T * x,
std::complex< double > * out ) const

Batched products accumulated in double precision.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: