ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Array_Pool is a class designed for dynamically allocating a two-dimensional array with all its elements contiguously arranged in memory. Compared to a two-dimensional vector, it offers better data locality because all elements are stored in a continuous block of memory. More...
#include <array_pool.h>
Public Member Functions | |
Array_Pool ()=default | |
Array_Pool (const int nr_in, const int nc_in) | |
Array_Pool (Array_Pool< T > &&other) | |
Array_Pool & | operator= (Array_Pool< T > &&other) |
~Array_Pool () | |
Array_Pool (const Array_Pool< T > &other)=delete | |
Array_Pool & | operator= (const Array_Pool &other)=delete |
T ** | get_ptr_2D () const |
T * | get_ptr_1D () const |
int | get_nr () const |
int | get_nc () const |
T * | operator[] (const int ir) const |
Private Attributes | |
T ** | ptr_2D = nullptr |
T * | ptr_1D = nullptr |
int | nr = 0 |
int | nc = 0 |
Array_Pool is a class designed for dynamically allocating a two-dimensional array with all its elements contiguously arranged in memory. Compared to a two-dimensional vector, it offers better data locality because all elements are stored in a continuous block of memory.
T |
|
default |
ModuleBase::Array_Pool< T >::Array_Pool | ( | const int | nr_in, |
const int | nc_in | ||
) |
ModuleBase::Array_Pool< T >::Array_Pool | ( | Array_Pool< T > && | other | ) |
ModuleBase::Array_Pool< T >::~Array_Pool | ( | ) |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
Array_Pool< T > & ModuleBase::Array_Pool< T >::operator= | ( | Array_Pool< T > && | other | ) |
|
delete |
|
inline |
|
private |
|
private |
|
private |
|
private |