ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
StoChe< REAL, Device > Class Template Reference

#include <sto_che.h>

Collaboration diagram for StoChe< REAL, Device >:

Classes

struct  delmem_var_deleter
 deleter for device-side spolyv buffer More...

Public Member Functions

 StoChe ()=default
 ~StoChe ()=default
 StoChe (const StoChe &)=delete
StoChe & operator= (const StoChe &)=delete
 StoChe (StoChe &&) noexcept=default
StoChe & operator= (StoChe &&) noexcept=default
void init (const int &nche, const int &method, const REAL &emax_sto, const REAL &emin_sto)
 (Re)allocate Chebyshev expansion buffers. Safe to call multiple times.

Public Attributes

int nche = 0
 order of Chebyshev expansion
std::unique_ptr< REAL, delmem_var_deleter > spolyv
 [Device] coefficients of Chebyshev expansion
std::vector< REAL > spolyv_cpu
 [CPU] coefficients of Chebyshev expansion (method==1 only)
int method_sto = 0
 method for the stochastic calculation
std::unique_ptr< ModuleBase::Chebyshev< REAL, Device > > p_che
 Chebyshev expansion. Stores the plan of FFTW and should be initialized at the beginning of the calculation.
REAL emax_sto = 0.0
 maximum energy for normalization
REAL emin_sto = 0.0
 minimum energy for normalization

Private Types

using resmem_var_op = base_device::memory::resize_memory_op<REAL, Device>
using delmem_var_op = base_device::memory::delete_memory_op<REAL, Device>
using syncmem_var_d2h_op = base_device::memory::synchronize_memory_op<REAL, base_device::DEVICE_CPU, Device>

Private Attributes

Device * ctx = {}

Member Typedef Documentation

◆ delmem_var_op

template<typename REAL, typename Device = base_device::DEVICE_CPU>
using StoChe< REAL, Device >::delmem_var_op = base_device::memory::delete_memory_op<REAL, Device>
private

◆ resmem_var_op

template<typename REAL, typename Device = base_device::DEVICE_CPU>
using StoChe< REAL, Device >::resmem_var_op = base_device::memory::resize_memory_op<REAL, Device>
private

◆ syncmem_var_d2h_op

template<typename REAL, typename Device = base_device::DEVICE_CPU>
using StoChe< REAL, Device >::syncmem_var_d2h_op = base_device::memory::synchronize_memory_op<REAL, base_device::DEVICE_CPU, Device>
private

Constructor & Destructor Documentation

◆ StoChe() [1/3]

template<typename REAL, typename Device = base_device::DEVICE_CPU>
StoChe< REAL, Device >::StoChe ( )
default
Here is the caller graph for this function:

◆ ~StoChe()

template<typename REAL, typename Device = base_device::DEVICE_CPU>
StoChe< REAL, Device >::~StoChe ( )
default

◆ StoChe() [2/3]

template<typename REAL, typename Device = base_device::DEVICE_CPU>
StoChe< REAL, Device >::StoChe ( const StoChe< REAL, Device > & )
delete
Here is the call graph for this function:

◆ StoChe() [3/3]

template<typename REAL, typename Device = base_device::DEVICE_CPU>
StoChe< REAL, Device >::StoChe ( StoChe< REAL, Device > && )
defaultnoexcept
Here is the call graph for this function:

Member Function Documentation

◆ init()

template<typename REAL, typename Device>
void StoChe< REAL, Device >::init ( const int & nche,
const int & method,
const REAL & emax_sto,
const REAL & emin_sto )

(Re)allocate Chebyshev expansion buffers. Safe to call multiple times.

Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename REAL, typename Device = base_device::DEVICE_CPU>
StoChe & StoChe< REAL, Device >::operator= ( const StoChe< REAL, Device > & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

template<typename REAL, typename Device = base_device::DEVICE_CPU>
StoChe & StoChe< REAL, Device >::operator= ( StoChe< REAL, Device > && )
defaultnoexcept
Here is the call graph for this function:

Member Data Documentation

◆ ctx

template<typename REAL, typename Device = base_device::DEVICE_CPU>
Device* StoChe< REAL, Device >::ctx = {}
private

◆ emax_sto

template<typename REAL, typename Device = base_device::DEVICE_CPU>
REAL StoChe< REAL, Device >::emax_sto = 0.0

maximum energy for normalization

◆ emin_sto

template<typename REAL, typename Device = base_device::DEVICE_CPU>
REAL StoChe< REAL, Device >::emin_sto = 0.0

minimum energy for normalization

◆ method_sto

template<typename REAL, typename Device = base_device::DEVICE_CPU>
int StoChe< REAL, Device >::method_sto = 0

method for the stochastic calculation

◆ nche

template<typename REAL, typename Device = base_device::DEVICE_CPU>
int StoChe< REAL, Device >::nche = 0

order of Chebyshev expansion

◆ p_che

template<typename REAL, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<ModuleBase::Chebyshev<REAL, Device> > StoChe< REAL, Device >::p_che

Chebyshev expansion. Stores the plan of FFTW and should be initialized at the beginning of the calculation.

◆ spolyv

template<typename REAL, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<REAL, delmem_var_deleter> StoChe< REAL, Device >::spolyv

[Device] coefficients of Chebyshev expansion

◆ spolyv_cpu

template<typename REAL, typename Device = base_device::DEVICE_CPU>
std::vector<REAL> StoChe< REAL, Device >::spolyv_cpu

[CPU] coefficients of Chebyshev expansion (method==1 only)


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