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:341
int get_current_b() const
Definition psi.cpp:467
int get_current_nbas() const
Definition psi.cpp:473
int nbasis
Definition psi.h:150
int current_k
Definition psi.h:152
const int & get_nk() const
Definition psi.cpp:335
Psi & operator=(const Psi &psi_in)
Definition psi.cpp:229
T & operator()(const int ikb1, const int ikb2, const int ibasis) const
Definition psi.cpp:436
~Psi()
Definition psi.cpp:38
int get_npol() const
Definition psi.cpp:322
void set_all_psi(const T *another_pointer, const std::size_t size_in)
Definition psi.cpp:222
int nbands
Definition psi.h:149
std::tuple< const T *, int > to_range(const Range &range) const
Definition psi.cpp:493
int nk
Definition psi.h:148
size_t size() const
Definition psi.cpp:353
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:418
const bool & get_k_first() const
Definition psi.cpp:285
const int & get_nbasis() const
Definition psi.cpp:347
void resize(const int nks_in, const int nbands_in, const int nbasis_in)
Definition psi.cpp:253
const int * get_ngk_pointer() const
Definition psi.cpp:297
int get_current_k() const
Definition psi.cpp:461
size_t psi_bias
Definition psi.h:159
T * get_pointer() const
Definition psi.cpp:271
void fix_b(const int ib) const
Definition psi.cpp:394
int current_nbasis
Definition psi.h:154
const int * ngk
Definition psi.h:161
void zero_out()
Definition psi.cpp:486
const int & get_ngk(const int ik_in) const
Definition psi.cpp:479
const size_t & get_psi_bias() const
Definition psi.cpp:303
const int & get_current_ngk() const
Definition psi.cpp:309
Device * ctx
Definition psi.h:145
const Device * get_device() const
Definition psi.cpp:291
void fix_k(const int ik) const
Definition psi.cpp:363
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:115
Definition memory_op.h:17
Definition memory_op.h:31
Definition memory_op.h:61
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