7template <
typename REAL,
typename Device = base_device::DEVICE_CPU>
30 using resmem_var_op = base_device::memory::resize_memory_op_mt<REAL, Device>;
31 using delmem_var_op = base_device::memory::delete_memory_op_mt<REAL, Device>;
47template <
typename REAL,
typename Device>
48REAL
vTMv(
const REAL* v,
const REAL* M,
const int n)
51 base_device::DEVICE_CPU* cpu_ctx = {};
53 const char normal =
'N';
59 ModuleBase::gemv_op<REAL, Device>()(normal, n, n, &one, M, n, v, inc, &
zero, y, inc);
61 REAL* dot_device =
nullptr;
A class to treat the Chebyshev expansion.
Definition math_chebyshev.h:84
base_device::memory::resize_memory_op< REAL, Device > resmem_var_op
Definition sto_che.h:33
base_device::memory::delete_memory_op< REAL, Device > delmem_var_op
Definition sto_che.h:34
~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:48
Definition math_kernel_op.h:191
Definition memory_op.h:115
Definition memory_op.h:17
Definition memory_op.h:61
T type
Definition tensor_types.h:114
const std::map< std::string, std::vector< double > > zero
Definition vdwd3_autoset_xcparam.cpp:326