@@ -107,32 +107,6 @@ Psi<T, Device>::Psi(T* psi_pointer, const int nk_in, const int nbd_in, const int
107107 base_device::information::print_device_info<Device>(this ->ctx , GlobalV::ofs_device);
108108}
109109
110- template <typename T, typename Device>
111- Psi<T, Device>::Psi(const Psi& psi_in, const int nk_in, int nband_in)
112- {
113- assert (nk_in <= psi_in.get_nk ());
114- if (nband_in == 0 )
115- {
116- nband_in = psi_in.get_nbands ();
117- }
118- this ->k_first = psi_in.get_k_first ();
119- this ->device = psi_in.device ;
120- this ->resize (nk_in, nband_in, psi_in.get_nbasis ());
121- this ->ngk = psi_in.ngk ;
122- this ->npol = psi_in.npol ;
123- if (nband_in <= psi_in.get_nbands ())
124- {
125- // copy from Psi from psi_in(current_k, 0, 0),
126- // if size of k is 1, current_k in new Psi is psi_in.current_k
127- if (nk_in == 1 )
128- {
129- // current_k for this Psi only keep the spin index same as the copied Psi
130- this ->current_k = psi_in.get_current_k ();
131- }
132- synchronize_memory_op ()(this ->ctx , psi_in.get_device (), this ->psi , psi_in.get_pointer (), this ->size ());
133- }
134- }
135-
136110template <typename T, typename Device>
137111Psi<T, Device>::Psi(T* psi_pointer, const Psi& psi_in, const int nk_in, int nband_in)
138112{
0 commit comments