7template <
typename REAL,
typename Device = base_device::DEVICE_CPU>
42template <
typename REAL,
typename Device>
43REAL
vTMv(
const REAL* v,
const REAL* M,
const int n)
46 base_device::DEVICE_CPU* cpu_ctx = {};
48 const char normal =
'N';
54 ModuleBase::gemv_op<REAL, Device>()(normal, n, n, &one, M, n, v, inc, &
zero, y, inc);
56 REAL* dot_device =
nullptr;
A class to treat the Chebyshev expansion.
Definition math_chebyshev.h:84
~StoChe()
Definition test_hsolver_sdft.cpp:90
ModuleBase::Chebyshev< REAL, Device > * p_che
Definition sto_che.h:22
Device * ctx
Definition sto_che.h:28
REAL emin_sto
minimum energy for normalization
Definition sto_che.h:25
REAL emax_sto
maximum energy for normalization
Definition sto_che.h:24
int nche
order of Chebyshev expansion
Definition sto_che.h:15
int method_sto
method for the stochastic calculation
Definition sto_che.h:18
REAL * spolyv
[Device] coefficients of Chebyshev expansion
Definition sto_che.h:16
REAL * spolyv_cpu
[CPU] coefficients of Chebyshev expansion
Definition sto_che.h:17
REAL vTMv(const REAL *v, const REAL *M, const int n)
calculate v^T*M*v
Definition sto_che.h:43
Definition math_kernel_op.h:192
Definition memory_op.h:77
Definition memory_op.h:17
Definition memory_op.h:45
T type
Definition tensor_types.h:114
const std::map< std::string, std::vector< double > > zero
Definition vdwd3_autoset_xcparam.cpp:323