ABACUS
develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
source
source_pw
module_stodft
kernels
hpsi_norm_op.h
Go to the documentation of this file.
1
#ifndef HPSI_NORM_OP_H
2
#define HPSI_NORM_OP_H
3
#include <complex>
4
#include "
source_base/module_device/device.h
"
5
namespace
hamilt
6
{
7
template
<
typename
FPTYPE,
typename
Device>
8
struct
hpsi_norm_op
9
{
23
void
operator()
(
const
Device* dev,
24
const
int
& nbands,
25
const
int
& npwk_max,
26
const
int
& npwk,
27
const
FPTYPE& Ebar,
28
const
FPTYPE& DeltaE,
29
std::complex<FPTYPE>* hpsi_norm,
30
const
std::complex<FPTYPE>* psi_in);
31
};
32
#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
33
// Partially specialize functor for base_device::GpuDevice.
34
template
<
typename
FPTYPE>
35
struct
hpsi_norm_op
<FPTYPE,
base_device
::DEVICE_GPU>
36
{
37
void
operator()
(
const
base_device::DEVICE_GPU* dev,
38
const
int
& nbands,
39
const
int
& npwk_max,
40
const
int
& npwk,
41
const
FPTYPE& Ebar,
42
const
FPTYPE& DeltaE,
43
std::complex<FPTYPE>* hpsi_norm,
44
const
std::complex<FPTYPE>* psi_in);
45
};
46
#endif
// __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
47
}
// namespace hamilt
48
#endif
device.h
base_device
Definition
device.cpp:21
hamilt
Definition
hamilt.h:12
hamilt::hpsi_norm_op
Definition
hpsi_norm_op.h:9
hamilt::hpsi_norm_op::operator()
void operator()(const Device *dev, const int &nbands, const int &npwk_max, const int &npwk, const FPTYPE &Ebar, const FPTYPE &DeltaE, std::complex< FPTYPE > *hpsi_norm, const std::complex< FPTYPE > *psi_in)
normalize hPsi with emin and emax
Generated by
1.9.8