@@ -100,7 +100,7 @@ void PW_Basis_K:: initparameters(
100100 if (this ->device == " gpu" ) {
101101 if (this ->precision == " single" ) {
102102 resmem_sd_op ()(this ->s_kvec_c , this ->nks * 3 );
103- castmem_d2s_h2d_op ()(gpu_ctx, cpu_ctx, this ->s_kvec_c , reinterpret_cast <double *>(&this ->kvec_c [0 ][0 ]), this ->nks * 3 );
103+ castmem_d2s_h2d_op ()(this ->s_kvec_c , reinterpret_cast <double *>(&this ->kvec_c [0 ][0 ]), this ->nks * 3 );
104104 }
105105 resmem_dd_op ()(this ->d_kvec_c , this ->nks * 3 );
106106 syncmem_d2d_h2d_op ()(this ->d_kvec_c , reinterpret_cast <double *>(&this ->kvec_c [0 ][0 ]), this ->nks * 3 );
@@ -109,7 +109,7 @@ void PW_Basis_K:: initparameters(
109109#endif
110110 if (this ->precision == " single" ) {
111111 resmem_sh_op ()(this ->s_kvec_c , this ->nks * 3 );
112- castmem_d2s_h2h_op ()(cpu_ctx, cpu_ctx, this ->s_kvec_c , reinterpret_cast <double *>(&this ->kvec_c [0 ][0 ]), this ->nks * 3 );
112+ castmem_d2s_h2h_op ()(this ->s_kvec_c , reinterpret_cast <double *>(&this ->kvec_c [0 ][0 ]), this ->nks * 3 );
113113 }
114114 this ->d_kvec_c = reinterpret_cast <double *>(&this ->kvec_c [0 ][0 ]);
115115 // There's no need to allocate double pointers while in a CPU environment.
@@ -249,8 +249,8 @@ void PW_Basis_K::collect_local_pw(const double& erf_ecut_in, const double& erf_h
249249 if (this ->precision == " single" ) {
250250 resmem_sd_op ()(this ->s_gk2 , this ->npwk_max * this ->nks );
251251 resmem_sd_op ()(this ->s_gcar , this ->npwk_max * this ->nks * 3 );
252- castmem_d2s_h2d_op ()(gpu_ctx, cpu_ctx, this ->s_gk2 , this ->gk2 , this ->npwk_max * this ->nks );
253- castmem_d2s_h2d_op ()(gpu_ctx, cpu_ctx, this ->s_gcar , reinterpret_cast <double *>(&this ->gcar [0 ][0 ]), this ->npwk_max * this ->nks * 3 );
252+ castmem_d2s_h2d_op ()(this ->s_gk2 , this ->gk2 , this ->npwk_max * this ->nks );
253+ castmem_d2s_h2d_op ()(this ->s_gcar , reinterpret_cast <double *>(&this ->gcar [0 ][0 ]), this ->npwk_max * this ->nks * 3 );
254254 }
255255 else {
256256 resmem_dd_op ()(this ->d_gk2 , this ->npwk_max * this ->nks );
@@ -264,8 +264,8 @@ void PW_Basis_K::collect_local_pw(const double& erf_ecut_in, const double& erf_h
264264 if (this ->precision == " single" ) {
265265 resmem_sh_op ()(this ->s_gk2 , this ->npwk_max * this ->nks , " PW_B_K::s_gk2" );
266266 resmem_sh_op ()(this ->s_gcar , this ->npwk_max * this ->nks * 3 , " PW_B_K::s_gcar" );
267- castmem_d2s_h2h_op ()(cpu_ctx, cpu_ctx, this ->s_gk2 , this ->gk2 , this ->npwk_max * this ->nks );
268- castmem_d2s_h2h_op ()(cpu_ctx, cpu_ctx, this ->s_gcar , reinterpret_cast <double *>(&this ->gcar [0 ][0 ]), this ->npwk_max * this ->nks * 3 );
267+ castmem_d2s_h2h_op ()(this ->s_gk2 , this ->gk2 , this ->npwk_max * this ->nks );
268+ castmem_d2s_h2h_op ()(this ->s_gcar , reinterpret_cast <double *>(&this ->gcar [0 ][0 ]), this ->npwk_max * this ->nks * 3 );
269269 }
270270 else {
271271 this ->d_gcar = reinterpret_cast <double *>(&this ->gcar [0 ][0 ]);
0 commit comments