@@ -131,7 +131,7 @@ REAL Chebyshev<REAL, Device>::ddot_real(const std::complex<REAL>* psi_L,
131131 REAL* dot_device = nullptr ;
132132 resmem_var_op ()(dot_device, 1 );
133133 container::kernels::blas_dot<REAL, ct_Device>()(dim2, pL, 1 , pR, 1 , dot_device);
134- syncmem_var_d2h_op ()(cpu_ctx, this -> ctx , &result, dot_device, 1 );
134+ syncmem_var_d2h_op ()(&result, dot_device, 1 );
135135 delmem_var_op ()(this ->ctx , dot_device);
136136 }
137137 else
@@ -146,7 +146,7 @@ REAL Chebyshev<REAL, Device>::ddot_real(const std::complex<REAL>* psi_L,
146146 int dim2 = 2 * N;
147147 container::kernels::blas_dot<REAL, ct_Device>()(dim2, pL, 1 , pR, 1 , dot_device);
148148 REAL result_temp = 0 ;
149- syncmem_var_d2h_op ()(cpu_ctx, this -> ctx , &result_temp, dot_device, 1 );
149+ syncmem_var_d2h_op ()(&result_temp, dot_device, 1 );
150150 result += result_temp;
151151 pL += 2 * LDA;
152152 pR += 2 * LDA;
@@ -211,7 +211,7 @@ void Chebyshev<REAL, Device>::calcoef_real(std::function<REAL(REAL)> fun)
211211
212212 if (base_device::get_device_type<Device>(this ->ctx ) == base_device::GpuDevice)
213213 {
214- syncmem_var_h2d_op ()(this -> ctx , this -> cpu_ctx , coef_real, coefr_cpu, norder);
214+ syncmem_var_h2d_op ()(coef_real, coefr_cpu, norder);
215215 }
216216
217217 getcoef_real = true ;
@@ -301,7 +301,7 @@ void Chebyshev<REAL, Device>::calcoef_complex(std::function<std::complex<REAL>(s
301301 }
302302 if (base_device::get_device_type<Device>(this ->ctx ) == base_device::GpuDevice)
303303 {
304- syncmem_complex_h2d_op ()(this -> ctx , this -> cpu_ctx , coef_complex, coefc_cpu, norder);
304+ syncmem_complex_h2d_op ()(coef_complex, coefc_cpu, norder);
305305 }
306306
307307 getcoef_complex = true ;
@@ -392,7 +392,7 @@ void Chebyshev<REAL, Device>::calcoef_pair(std::function<REAL(REAL)> fun1, std::
392392
393393 if (base_device::get_device_type<Device>(this ->ctx ) == base_device::GpuDevice)
394394 {
395- syncmem_complex_h2d_op ()(this -> ctx , this -> cpu_ctx , coef_complex, coefc_cpu, norder);
395+ syncmem_complex_h2d_op ()(coef_complex, coefc_cpu, norder);
396396 }
397397
398398 getcoef_complex = true ;
@@ -431,7 +431,7 @@ void Chebyshev<REAL, Device>::calfinalvec_real(
431431 resmem_complex_op ()(arrayn, ndmxt);
432432 resmem_complex_op ()(arrayn_1, ndmxt);
433433
434- memcpy_complex_op ()(this -> ctx , this -> ctx , arrayn_1, wavein, ndmxt);
434+ memcpy_complex_op ()(arrayn_1, wavein, ndmxt);
435435 // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, ndmxt);
436436
437437 funA (arrayn_1, arrayn, m);
@@ -500,7 +500,7 @@ void Chebyshev<REAL, Device>::calfinalvec_complex(
500500 resmem_complex_op ()(arrayn, ndmxt);
501501 resmem_complex_op ()(arrayn_1, ndmxt);
502502
503- memcpy_complex_op ()(this -> ctx , this -> ctx , arrayn_1, wavein, ndmxt);
503+ memcpy_complex_op ()(arrayn_1, wavein, ndmxt);
504504
505505 funA (arrayn_1, arrayn, m);
506506
@@ -553,7 +553,7 @@ void Chebyshev<REAL, Device>::calpolyvec_complex(
553553 std::complex <REAL>*tmpin = wavein, *tmpout = arrayn_1;
554554 for (int i = 0 ; i < m; ++i)
555555 {
556- memcpy_complex_op ()(this -> ctx , this -> ctx , tmpout, tmpin, N);
556+ memcpy_complex_op ()(tmpout, tmpin, N);
557557 // ModuleBase::GlobalFunc::DCOPY(tmpin, tmpout, N);
558558 tmpin += LDA;
559559 tmpout += LDA;
@@ -599,7 +599,7 @@ void Chebyshev<REAL, Device>::tracepolyA(
599599 resmem_complex_op ()(arrayn, ndmxt);
600600 resmem_complex_op ()(arrayn_1, ndmxt);
601601
602- memcpy_complex_op ()(this -> ctx , this -> ctx , arrayn_1, wavein, ndmxt);
602+ memcpy_complex_op ()(arrayn_1, wavein, ndmxt);
603603 // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, ndmxt);
604604
605605 funA (arrayn_1, arrayn, m);
@@ -673,7 +673,7 @@ bool Chebyshev<REAL, Device>::checkconverge(
673673 resmem_complex_op ()(arrayn, LDA);
674674 resmem_complex_op ()(arrayn_1, LDA);
675675
676- memcpy_complex_op ()(this -> ctx , this -> ctx , arrayn_1, wavein, N);
676+ memcpy_complex_op ()(arrayn_1, wavein, N);
677677 // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, N);
678678
679679 if (tmin == tmax)
0 commit comments