@@ -44,13 +44,6 @@ Psi<T, Device>::~Psi()
4444 }
4545}
4646
47- // template <typename T, typename Device> Psi<T, Device>::Psi(const int* ngk_in)
48- // {
49- // this->ngk = ngk_in;
50- // this->npol = PARAM.globalv.npol;
51- // this->device = base_device::get_device_type<Device>(this->ctx);
52- // }
53-
5447template <typename T, typename Device>
5548Psi<T, Device>::Psi(const int nk_in, const int nbd_in, const int nbs_in, const int * ngk_in, const bool k_first_in)
5649{
@@ -70,40 +63,16 @@ Psi<T, Device>::Psi(const int nk_in, const int nbd_in, const int nbs_in, const i
7063}
7164
7265// Constructor 8-1:
73- // template <typename T, typename Device>
74- // Psi<T, Device>::Psi(T* psi_pointer,
75- // const int nk_in,
76- // const int nbd_in,
77- // const int nbs_in,
78- // const int* ngk_in,
79- // const bool k_first_in)
80- // {
81- // this->k_first = k_first_in;
82- // this->ngk = ngk_in;
83- // this->current_b = 0;
84- // this->current_k = 0;
85- // this->npol = PARAM.globalv.npol;
86- // this->device = base_device::get_device_type<Device>(this->ctx);
87- // this->nk = nk_in;
88- // this->nbands = nbd_in;
89- // this->nbasis = nbs_in;
90- // this->current_nbasis = nbs_in;
91- // this->psi_current = this->psi = psi_pointer;
92- // this->allocate_inside = false;
93- // // Currently only GPU's implementation is supported for device recording!
94- // base_device::information::print_device_info<Device>(this->ctx, GlobalV::ofs_device);
95- // }
96-
97- // Constructor 8-3:
9866template <typename T, typename Device>
9967Psi<T, Device>::Psi(T* psi_pointer,
10068 const int nk_in,
10169 const int nbd_in,
10270 const int nbs_in,
71+ const std::vector<int >& ngk_vector_in,
10372 const bool k_first_in)
10473{
10574 this ->k_first = k_first_in;
106- this ->ngk = nullptr ;
75+ this ->ngk = ngk_vector_in. data () ;
10776 this ->current_b = 0 ;
10877 this ->current_k = 0 ;
10978 this ->npol = PARAM.globalv .npol ;
@@ -120,15 +89,10 @@ Psi<T, Device>::Psi(T* psi_pointer,
12089
12190// Constructor 8-2:
12291template <typename T, typename Device>
123- Psi<T, Device>::Psi(T* psi_pointer,
124- const int nk_in,
125- const int nbd_in,
126- const int nbs_in,
127- const std::vector<int >& ngk_vector_in,
128- const bool k_first_in)
92+ Psi<T, Device>::Psi(T* psi_pointer, const int nk_in, const int nbd_in, const int nbs_in, const bool k_first_in)
12993{
13094 this ->k_first = k_first_in;
131- this ->ngk = ngk_vector_in. data () ;
95+ this ->ngk = nullptr ;
13296 this ->current_b = 0 ;
13397 this ->current_k = 0 ;
13498 this ->npol = PARAM.globalv .npol ;
0 commit comments