Skip to content

Commit efc0278

Browse files
committed
remove useless code
1 parent f26708b commit efc0278

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed

source/module_psi/psi.cpp

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -43,40 +43,7 @@ Psi<T, Device>::~Psi()
4343
}
4444
}
4545

46-
// // Constructor 1-1:
47-
// template <typename T, typename Device>
48-
// Psi<T, Device>::Psi(const int nk_in, const int nbd_in, const int nbs_in, const int* ngk_in, const bool k_first_in)
49-
// {
50-
// assert(nk_in > 0);
51-
// assert(nbd_in >= 0); // 187_PW_SDFT_ALL_GPU && 187_PW_MD_SDFT_ALL_GPU
52-
// assert(nbs_in > 0);
53-
54-
// this->k_first = k_first_in;
55-
// this->allocate_inside = true;
56-
57-
// this->ngk = ngk_in; // modify later
58-
// // This function will delete the psi array first(if psi exist), then malloc a new memory for it.
59-
// resize_memory_op()(this->ctx, this->psi, nk_in * static_cast<std::size_t>(nbd_in) * nbs_in, "no_record");
60-
61-
// this->nk = nk_in;
62-
// this->nbands = nbd_in;
63-
// this->nbasis = nbs_in;
64-
65-
// this->current_b = 0;
66-
// this->current_k = 0;
67-
// this->current_nbasis = nbs_in;
68-
// this->psi_current = this->psi;
69-
// this->psi_bias = 0;
70-
71-
// // Currently only GPU's implementation is supported for device recording!
72-
// base_device::information::print_device_info<Device>(this->ctx, GlobalV::ofs_device);
73-
// base_device::information::record_device_memory<Device>(this->ctx,
74-
// GlobalV::ofs_device,
75-
// "Psi->resize()",
76-
// sizeof(T) * nk_in * nbd_in * nbs_in);
77-
// }
78-
79-
// Constructor 1-2:
46+
// Constructor 1:
8047
template <typename T, typename Device>
8148
Psi<T, Device>::Psi(const int nk_in,
8249
const int nbd_in,

source/module_psi/psi.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ class Psi
3939
// Constructor 0: basic
4040
Psi();
4141

42-
// // Constructor 1-1: specify nk, nbands, nbasis, ngk, and do not need to call resize() later
43-
// Psi(const int nk_in, const int nbd_in, const int nbs_in, const int* ngk_in, const bool k_first_in);
44-
45-
// Constructor 1-2:
42+
// Constructor 1:
4643
Psi(const int nk_in, const int nbd_in, const int nbs_in, const std::vector<int>& ngk_in, const bool k_first_in);
4744

4845
// Constructor 2-1: initialize a new psi from the given psi_in

0 commit comments

Comments
 (0)