ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Functions
module_rt::gpu Namespace Reference

Functions

void initialize_gpu_resources ()
 Initialize GPU resources (copy grids to constant memory) Should be called at the start of each calculate_HR.
 
void finalize_gpu_resources ()
 Release GPU resources (clear any error states) Should be called at the end of each calculate_HR.
 
void snap_psibeta_atom_batch_gpu (const LCAO_Orbitals &orb, const InfoNonlocal &infoNL_, const int T0, const ModuleBase::Vector3< double > &R0, const ModuleBase::Vector3< double > &A, const AdjacentAtomInfo &adjs, const UnitCell *ucell, const Parallel_Orbitals *paraV, const int npol, const int nlm_dim, std::vector< std::vector< std::unordered_map< int, std::vector< std::complex< double > > > > > &nlm_tot)
 Atom-level GPU batch processing interface.
 

Function Documentation

◆ finalize_gpu_resources()

void module_rt::gpu::finalize_gpu_resources ( )

Release GPU resources (clear any error states) Should be called at the end of each calculate_HR.

◆ initialize_gpu_resources()

void module_rt::gpu::initialize_gpu_resources ( )

Initialize GPU resources (copy grids to constant memory) Should be called at the start of each calculate_HR.

◆ snap_psibeta_atom_batch_gpu()

void module_rt::gpu::snap_psibeta_atom_batch_gpu ( const LCAO_Orbitals orb,
const InfoNonlocal infoNL_,
const int  T0,
const ModuleBase::Vector3< double > &  R0,
const ModuleBase::Vector3< double > &  A,
const AdjacentAtomInfo adjs,
const UnitCell ucell,
const Parallel_Orbitals paraV,
const int  npol,
const int  nlm_dim,
std::vector< std::vector< std::unordered_map< int, std::vector< std::complex< double > > > > > &  nlm_tot 
)

Atom-level GPU batch processing interface.

Processes ALL neighbors for a center atom in a SINGLE kernel launch. This significantly reduces kernel launch overhead compared to neighbor-level batching.

Parameters
orbOrbital information
infoNL_Non-local pseudopotential information
T0Center atom type (projector location)
R0Center atom position (already multiplied by lat0)
AVector potential
adjsAdjacent atom information for this center atom
ucellUnit cell pointer
paraVParallel orbitals information
npolPolarization number
nlm_dim1 for no current, 4 for current calculation
nlm_totOutput: nlm_tot[ad][dir][iw_index] = nlm_vector