@@ -127,7 +127,7 @@ void DiagoCG<T, Device>::diag_mock(const ct::Tensor& prec_in,
127127 this ->spsi_func_ (phi_m, sphi); // sphi = S|psi(m)>
128128 this ->hpsi_func_ (phi_m, hphi); // hphi = H|psi(m)>
129129
130- eigen_pack[m] = dot_real_op ()(ctx_, this ->n_basis_ , phi_m.data <T>(), hphi.data <T>());
130+ eigen_pack[m] = dot_real_op ()(this ->n_basis_ , phi_m.data <T>(), hphi.data <T>());
131131
132132 int iter = 0 ;
133133 Real gg_last = 0.0 ;
@@ -231,9 +231,9 @@ void DiagoCG<T, Device>::calc_grad(const ct::Tensor& prec,
231231
232232 // Update lambda !
233233 // (4) <psi|SPH|psi >
234- const Real eh = ModuleBase::dot_real_op<T, Device>()(ctx_, this ->n_basis_ , sphi.data <T>(), grad.data <T>());
234+ const Real eh = ModuleBase::dot_real_op<T, Device>()(this ->n_basis_ , sphi.data <T>(), grad.data <T>());
235235 // (5) <psi|SPS|psi >
236- const Real es = ModuleBase::dot_real_op<T, Device>()(ctx_, this ->n_basis_ , sphi.data <T>(), pphi.data <T>());
236+ const Real es = ModuleBase::dot_real_op<T, Device>()(this ->n_basis_ , sphi.data <T>(), pphi.data <T>());
237237 const Real lambda = eh / es;
238238
239239 // Update g!
@@ -328,7 +328,7 @@ void DiagoCG<T, Device>::calc_gamma_cg(const int& iter,
328328 // gg_inter = <g|g0>
329329 // Attention : the 'g' in g0 is getted last time
330330 gg_inter
331- = ModuleBase::dot_real_op<T, Device>()(ctx_, this ->n_basis_ , grad.data <T>(), g0.data <T>()); // b means before
331+ = ModuleBase::dot_real_op<T, Device>()(this ->n_basis_ , grad.data <T>(), g0.data <T>()); // b means before
332332 }
333333
334334 // (2) Update for g0!
@@ -346,7 +346,7 @@ void DiagoCG<T, Device>::calc_gamma_cg(const int& iter,
346346
347347 // (3) Update gg_now!
348348 // gg_now = < g|P|scg > = < g|g0 >
349- const Real gg_now = ModuleBase::dot_real_op<T, Device>()(ctx_, this ->n_basis_ , grad.data <T>(), g0.data <T>());
349+ const Real gg_now = ModuleBase::dot_real_op<T, Device>()(this ->n_basis_ , grad.data <T>(), g0.data <T>());
350350
351351 if (iter == 0 )
352352 {
@@ -404,15 +404,15 @@ bool DiagoCG<T, Device>::update_psi(const ct::Tensor& pphi,
404404 ct::Tensor& sphi,
405405 ct::Tensor& hphi)
406406{
407- cg_norm = sqrt (ModuleBase::dot_real_op<T, Device>()(ctx_, this ->n_basis_ , cg.data <T>(), scg.data <T>()));
407+ cg_norm = sqrt (ModuleBase::dot_real_op<T, Device>()(this ->n_basis_ , cg.data <T>(), scg.data <T>()));
408408
409409 if (cg_norm < 1.0e-10 )
410410 return true ;
411411
412412 const Real a0
413- = ModuleBase::dot_real_op<T, Device>()(ctx_, this ->n_basis_ , phi_m.data <T>(), pphi.data <T>()) * 2.0 / cg_norm;
413+ = ModuleBase::dot_real_op<T, Device>()(this ->n_basis_ , phi_m.data <T>(), pphi.data <T>()) * 2.0 / cg_norm;
414414 const Real b0
415- = ModuleBase::dot_real_op<T, Device>()(ctx_, this ->n_basis_ , cg.data <T>(), pphi.data <T>()) / (cg_norm * cg_norm);
415+ = ModuleBase::dot_real_op<T, Device>()(this ->n_basis_ , cg.data <T>(), pphi.data <T>()) / (cg_norm * cg_norm);
416416
417417 const Real e0 = eigen;
418418 theta = atan (a0 / (e0 - b0)) / 2.0 ;
@@ -538,7 +538,7 @@ void DiagoCG<T, Device>::schmit_orth(const int& m, const ct::Tensor& psi, const
538538 }*/
539539 // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
540540 auto psi_norm = ct::extract<Real>(lagrange_so[m])
541- - dot_real_op ()(ctx_, m, lagrange_so.data <T>(), lagrange_so.data <T>(), false );
541+ - dot_real_op ()(m, lagrange_so.data <T>(), lagrange_so.data <T>(), false );
542542
543543 if (psi_norm <= 0.0 )
544544 {
0 commit comments