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 "
source_base/module_device/types.h
"
4
#include <complex>
5
#include "
source_base/module_device/device.h
"
6
namespace
hamilt
7
{
8
template
<
typename
FPTYPE,
typename
Device>
9
struct
hpsi_norm_op
10
{
24
void
operator()
(
const
Device* dev,
25
const
int
& nbands,
26
const
int
& npwk_max,
27
const
int
& npwk,
28
const
FPTYPE& Ebar,
29
const
FPTYPE& DeltaE,
30
std::complex<FPTYPE>* hpsi_norm,
31
const
std::complex<FPTYPE>* psi_in);
32
};
33
#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
34
// Partially specialize functor for base_device::GpuDevice.
35
template
<
typename
FPTYPE>
36
struct
hpsi_norm_op
<FPTYPE,
base_device
::DEVICE_GPU>
37
{
38
void
operator()
(
const
base_device::DEVICE_GPU* dev,
39
const
int
& nbands,
40
const
int
& npwk_max,
41
const
int
& npwk,
42
const
FPTYPE& Ebar,
43
const
FPTYPE& DeltaE,
44
std::complex<FPTYPE>* hpsi_norm,
45
const
std::complex<FPTYPE>* psi_in);
46
};
47
#endif
// __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
48
}
// namespace hamilt
49
#endif
device.h
base_device
Definition
device.cpp:21
hamilt
Definition
hamilt.h:13
hamilt::hpsi_norm_op
Definition
hpsi_norm_op.h:10
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
types.h
Generated by
1.9.8