@@ -12,7 +12,7 @@ using namespace hsolver;
1212
1313
1414template <typename T, typename Device>
15- DiagoDavid<T, Device>::DiagoDavid(const Real* precondition_in,
15+ DiagoDavid<T, Device>::DiagoDavid(const Real* precondition_in,
1616 const int nband_in,
1717 const int dim_in,
1818 const int david_ndim_in,
@@ -80,7 +80,7 @@ DiagoDavid<T, Device>::DiagoDavid(const Real* precondition_in,
8080 resmem_complex_op ()(this ->vcc , nbase_x * nbase_x, " DAV::vcc" );
8181 setmem_complex_op ()(this ->vcc , 0 , nbase_x * nbase_x);
8282 // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
83-
83+
8484 // lagrange_matrix(nband, nband); // for orthogonalization
8585 resmem_complex_op ()(this ->lagrange_matrix , nband * nband);
8686 setmem_complex_op ()(this ->lagrange_matrix , 0 , nband * nband);
@@ -409,7 +409,7 @@ void DiagoDavid<T, Device>::cal_grad(const HPsiFunc& hpsi_func,
409409 // basis[nbase] = basis[nbase] - spsi * vc_ev_vector
410410 // = hpsi - spsi * lambda * vcc
411411 // = (H - lambda * S) * psi * vcc
412- // = (H - lambda * S) * psi_new
412+ // = (H - lambda * S) * psi_new
413413 // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
414414 ModuleBase::gemm_op<T, Device>()(' N' ,
415415 ' N' ,
@@ -622,15 +622,17 @@ void DiagoDavid<T, Device>::diag_zhegvx(const int& nbase,
622622 resmem_var_op ()(eigenvalue_gpu, nbase_x);
623623 syncmem_var_h2d_op ()(eigenvalue_gpu, this ->eigenvalue , nbase_x);
624624
625- heevx_op<T, Device>()(this ->ctx , nbase, nbase_x, hcc, nband, eigenvalue_gpu, vcc);
625+ // heevx_op<T, Device>()(this->ctx, nbase, nbase_x, hcc, nband, eigenvalue_gpu, vcc);
626+ ct::kernels::lapack_heevx<T, ct_Device>()(nbase, nbase_x, hcc, nband, eigenvalue_gpu, vcc);
626627
627628 syncmem_var_d2h_op ()(this ->eigenvalue , eigenvalue_gpu, nbase_x);
628629 delmem_var_op ()(eigenvalue_gpu);
629630#endif
630631 }
631632 else
632633 {
633- heevx_op<T, Device>()(this ->ctx , nbase, nbase_x, hcc, nband, this ->eigenvalue , vcc);
634+ // heevx_op<T, Device>()(this->ctx, nbase, nbase_x, hcc, nband, this->eigenvalue, vcc);
635+ ct::kernels::lapack_heevx<T, ct_Device>()(nbase, nbase_x, hcc, nband, this ->eigenvalue , vcc);
634636 }
635637 }
636638
0 commit comments