@@ -377,7 +377,7 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
377377 if (this ->method == " cg" )
378378 {
379379 // wrap the subspace_func into a lambda function
380- auto subspace_func = [hm, ngk_pointer, ngk_vector](const ct::Tensor& psi_in, ct::Tensor& psi_out) {
380+ auto subspace_func = [hm, ngk_vector](const ct::Tensor& psi_in, ct::Tensor& psi_out) {
381381 // psi_in should be a 2D tensor:
382382 // psi_in.shape() = [nbands, nbasis]
383383 const auto ndim = psi_in.shape ().ndim ();
@@ -411,7 +411,7 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
411411 using ct_Device = typename ct::PsiToContainer<Device>::type;
412412
413413 // wrap the hpsi_func and spsi_func into a lambda function
414- auto hpsi_func = [hm, ngk_pointer, ngk_vector](const ct::Tensor& psi_in, ct::Tensor& hpsi_out) {
414+ auto hpsi_func = [hm, ngk_vector](const ct::Tensor& psi_in, ct::Tensor& hpsi_out) {
415415 ModuleBase::timer::tick (" DiagoCG_New" , " hpsi_func" );
416416 // psi_in should be a 2D tensor:
417417 // psi_in.shape() = [nbands, nbasis]
@@ -482,7 +482,7 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
482482 const int nband = psi.get_nbands ();
483483 const int nbasis = psi.get_nbasis ();
484484 // hpsi_func (X, HX, ld, nvec) -> HX = H(X), X and HX blockvectors of size ld x nvec
485- auto hpsi_func = [hm, ngk_pointer, ngk_vector](T* psi_in, T* hpsi_out, const int ld_psi, const int nvec) {
485+ auto hpsi_func = [hm, ngk_vector](T* psi_in, T* hpsi_out, const int ld_psi, const int nvec) {
486486 ModuleBase::timer::tick (" DavSubspace" , " hpsi_func" );
487487
488488 // Convert "pointer data stucture" to a psi::Psi object
@@ -503,7 +503,7 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
503503 else if (this ->method == " dav_subspace" )
504504 {
505505 // hpsi_func (X, HX, ld, nvec) -> HX = H(X), X and HX blockvectors of size ld x nvec
506- auto hpsi_func = [hm, ngk_pointer, ngk_vector](T* psi_in, T* hpsi_out, const int ld_psi, const int nvec) {
506+ auto hpsi_func = [hm, ngk_vector](T* psi_in, T* hpsi_out, const int ld_psi, const int nvec) {
507507 ModuleBase::timer::tick (" DavSubspace" , " hpsi_func" );
508508
509509 // Convert "pointer data stucture" to a psi::Psi object
@@ -554,7 +554,7 @@ void HSolverPW<T, Device>::hamiltSolvePsiK(hamilt::Hamilt<T, Device>* hm,
554554 // Davidson matrix-blockvector functions
555555 // / wrap hpsi into lambda function, Matrix \times blockvector
556556 // hpsi_func (X, HX, ld, nvec) -> HX = H(X), X and HX blockvectors of size ld x nvec
557- auto hpsi_func = [hm, ngk_pointer, ngk_vector](T* psi_in, T* hpsi_out, const int ld_psi, const int nvec) {
557+ auto hpsi_func = [hm, ngk_vector](T* psi_in, T* hpsi_out, const int ld_psi, const int nvec) {
558558 ModuleBase::timer::tick (" David" , " hpsi_func" );
559559
560560 // Convert pointer of psi_in to a psi::Psi object
0 commit comments