@@ -63,8 +63,8 @@ Chebyshev<REAL, Device>::Chebyshev(const int norder_in) : fftw(2 * EXTEND * nord
6363 coefc_cpu = new std::complex <REAL>[norder];
6464 if (base_device::get_device_type<Device>(this ->ctx ) == base_device::GpuDevice)
6565 {
66- resmem_var_op ()(this ->ctx , this -> coef_real , norder);
67- resmem_complex_op ()(this ->ctx , this -> coef_complex , norder);
66+ resmem_var_op ()(this ->coef_real , norder);
67+ resmem_complex_op ()(this ->coef_complex , norder);
6868 }
6969 else
7070 {
@@ -129,7 +129,7 @@ REAL Chebyshev<REAL, Device>::ddot_real(const std::complex<REAL>* psi_L,
129129 pL = (REAL*)psi_L;
130130 pR = (REAL*)psi_R;
131131 REAL* dot_device = nullptr ;
132- resmem_var_op ()(this -> ctx , dot_device, 1 );
132+ resmem_var_op ()(dot_device, 1 );
133133 container::kernels::blas_dot<REAL, ct_Device>()(dim2, pL, 1 , pR, 1 , dot_device);
134134 syncmem_var_d2h_op ()(cpu_ctx, this ->ctx , &result, dot_device, 1 );
135135 delmem_var_op ()(this ->ctx , dot_device);
@@ -140,7 +140,7 @@ REAL Chebyshev<REAL, Device>::ddot_real(const std::complex<REAL>* psi_L,
140140 pL = (REAL*)psi_L;
141141 pR = (REAL*)psi_R;
142142 REAL* dot_device = nullptr ;
143- resmem_var_op ()(this -> ctx , dot_device, 1 );
143+ resmem_var_op ()(dot_device, 1 );
144144 for (int i = 0 ; i < m; ++i)
145145 {
146146 int dim2 = 2 * N;
@@ -427,9 +427,9 @@ void Chebyshev<REAL, Device>::calfinalvec_real(
427427 ndmxt = LDA * m;
428428 }
429429
430- resmem_complex_op ()(this -> ctx , arraynp1, ndmxt);
431- resmem_complex_op ()(this -> ctx , arrayn, ndmxt);
432- resmem_complex_op ()(this -> ctx , arrayn_1, ndmxt);
430+ resmem_complex_op ()(arraynp1, ndmxt);
431+ resmem_complex_op ()(arrayn, ndmxt);
432+ resmem_complex_op ()(arrayn_1, ndmxt);
433433
434434 memcpy_complex_op ()(this ->ctx , this ->ctx , arrayn_1, wavein, ndmxt);
435435 // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, ndmxt);
@@ -496,9 +496,9 @@ void Chebyshev<REAL, Device>::calfinalvec_complex(
496496 ndmxt = LDA * m;
497497 }
498498
499- resmem_complex_op ()(this -> ctx , arraynp1, ndmxt);
500- resmem_complex_op ()(this -> ctx , arrayn, ndmxt);
501- resmem_complex_op ()(this -> ctx , arrayn_1, ndmxt);
499+ resmem_complex_op ()(arraynp1, ndmxt);
500+ resmem_complex_op ()(arrayn, ndmxt);
501+ resmem_complex_op ()(arrayn_1, ndmxt);
502502
503503 memcpy_complex_op ()(this ->ctx , this ->ctx , arrayn_1, wavein, ndmxt);
504504
@@ -595,9 +595,9 @@ void Chebyshev<REAL, Device>::tracepolyA(
595595 ndmxt = LDA * m;
596596 }
597597
598- resmem_complex_op ()(this -> ctx , arraynp1, ndmxt);
599- resmem_complex_op ()(this -> ctx , arrayn, ndmxt);
600- resmem_complex_op ()(this -> ctx , arrayn_1, ndmxt);
598+ resmem_complex_op ()(arraynp1, ndmxt);
599+ resmem_complex_op ()(arrayn, ndmxt);
600+ resmem_complex_op ()(arrayn_1, ndmxt);
601601
602602 memcpy_complex_op ()(this ->ctx , this ->ctx , arrayn_1, wavein, ndmxt);
603603 // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, ndmxt);
@@ -669,9 +669,9 @@ bool Chebyshev<REAL, Device>::checkconverge(
669669 std::complex <REAL>* arrayn = nullptr ;
670670 std::complex <REAL>* arrayn_1 = nullptr ;
671671
672- resmem_complex_op ()(this -> ctx , arraynp1, LDA);
673- resmem_complex_op ()(this -> ctx , arrayn, LDA);
674- resmem_complex_op ()(this -> ctx , arrayn_1, LDA);
672+ resmem_complex_op ()(arraynp1, LDA);
673+ resmem_complex_op ()(arrayn, LDA);
674+ resmem_complex_op ()(arrayn_1, LDA);
675675
676676 memcpy_complex_op ()(this ->ctx , this ->ctx , arrayn_1, wavein, N);
677677 // ModuleBase::GlobalFunc::DCOPY(wavein, arrayn_1, N);
0 commit comments