28 Range(
const size_t range_in);
30 Range(
const bool k_first_in,
const size_t index_1_in,
const size_t range_1_in,
const size_t range_2_in);
35template <
typename T,
typename Device = base_device::DEVICE_CPU>
43 Psi(
const int nk_in,
const int nbd_in,
const int nbs_in,
const std::vector<int>& ngk_in,
const bool k_first_in);
50 template <
typename T_in,
typename Device_in = Device>
59 const int current_nbasis_in,
60 const bool k_first_in =
true);
63 Psi(
const int nk_in,
const int nbd_in,
const int nbs_in,
const int current_nbasis_in,
const bool k_first_in);
69 void set_all_psi(
const T* another_pointer,
const std::size_t size_in);
81 void resize(
const int nks_in,
const int nbands_in,
const int nbasis_in);
96 void fix_k(
const int ik)
const;
99 void fix_b(
const int ib)
const;
102 void fix_kb(
const int ik,
const int ib)
const;
107 T&
operator()(
const int ikb1,
const int ikb2,
const int ibasis)
const;
111 T&
operator()(
const int ikb2,
const int ibasis)
const;
122 const int&
get_ngk(
const int ik_in)
const;
138 std::tuple<const T*, int>
to_range(
const Range& range)
const;
168 using delete_memory_op = base_device::memory::delete_memory_op_mt<T, Device>;
169 using resize_memory_op = base_device::memory::resize_memory_op_mt<T, Device>;
const int & get_nbands() const
Definition psi.cpp:342
int get_current_b() const
Definition psi.cpp:468
int get_current_nbas() const
Definition psi.cpp:474
int nbasis
Definition psi.h:150
int current_k
Definition psi.h:152
const int & get_nk() const
Definition psi.cpp:336
Psi & operator=(const Psi &psi_in)
Definition psi.cpp:230
T & operator()(const int ikb1, const int ikb2, const int ibasis) const
Definition psi.cpp:437
~Psi()
Definition psi.cpp:38
int get_npol() const
Definition psi.cpp:323
void set_all_psi(const T *another_pointer, const std::size_t size_in)
Definition psi.cpp:223
int nbands
Definition psi.h:149
std::tuple< const T *, int > to_range(const Range &range) const
Definition psi.cpp:494
int nk
Definition psi.h:148
size_t size() const
Definition psi.cpp:354
bool allocate_inside
whether allocate psi inside Psi class
Definition psi.h:165
bool k_first
Definition psi.h:163
void fix_kb(const int ik, const int ib) const
Definition psi.cpp:419
const bool & get_k_first() const
Definition psi.cpp:286
const int & get_psi_bias() const
Definition psi.cpp:304
const int & get_nbasis() const
Definition psi.cpp:348
void resize(const int nks_in, const int nbands_in, const int nbasis_in)
Definition psi.cpp:254
const int * get_ngk_pointer() const
Definition psi.cpp:298
int get_current_k() const
Definition psi.cpp:462
T * get_pointer() const
Definition psi.cpp:272
void fix_b(const int ib) const
Definition psi.cpp:395
int current_nbasis
Definition psi.h:154
const int * ngk
Definition psi.h:161
void zero_out()
Definition psi.cpp:487
int psi_bias
Definition psi.h:159
const int & get_ngk(const int ik_in) const
Definition psi.cpp:480
const int & get_current_ngk() const
Definition psi.cpp:310
Device * ctx
Definition psi.h:145
const Device * get_device() const
Definition psi.cpp:292
void fix_k(const int ik) const
Definition psi.cpp:364
T * psi_current
Definition psi.h:157
int current_b
Definition psi.h:153
Psi()
Definition psi.cpp:33
#define T
Definition exp.cpp:237
Definition memory_op.h:77
Definition memory_op.h:17
Definition memory_op.h:31
Definition memory_op.h:45
bool k_first
k_first = 0: Psi(nbands, nks, nbasis) ; 1: Psi(nks, nbands, nbasis)
Definition psi.h:18
size_t index_1
index_1>= 0: target first index; index_1<0: no use
Definition psi.h:20
size_t range_1
Definition psi.h:23
size_t range_2
Definition psi.h:26