template<typename local_index = size_t>
class Mem_bal< local_index >
Class for BALANCED cell list implementation.
- Template Parameters
-
local_index | type of local index |
This class implement the BALANCED cell list is fast (not best) The memory allocation is small (not best). The memory allocation is (in byte) Size = M*16 + N*sizeof(ele)
Where
N = total number of elements M = number of cells sizeof(ele) = the size of the element the cell list is storing, example if the cell list store the particle id (64bit) is 8 byte
- Warning
- Do not use for extremely fine cell list (M big)
- Template Parameters
-
dim | Dimensionality of the space |
T | type of the space float, double, complex |
Definition at line 41 of file MemBalanced.hpp.
|
void | init_to_zero (size_t slot, size_t tot_n_cell) |
| Initialize all to zero. More...
|
|
Mem_bal & | operator= (const Mem_bal &cell) |
| Copy mem balanced. More...
|
|
void | addCell (size_t cell_id, typename base::value_type ele) |
| Add an element to the cell. More...
|
|
void | add (size_t cell_id, typename base::value_type ele) |
| Add an element to the cell. More...
|
|
void | remove (local_index cell, local_index ele) |
| Remove an element from the cell. More...
|
|
local_index | getNelements (const local_index cell_id) const |
| Get the number of elements in the cell. More...
|
|
auto | get (local_index cell, local_index ele) -> decltype(cl_base.get(0).get(0))& |
| Return an element from the cell. More...
|
|
auto | get (local_index cell, local_index ele) const -> decltype(cl_base.get(0).get(0))& |
| Return an element from the cell. More...
|
|
void | swap (Mem_bal &cl) |
| Swap two Mem_bal. More...
|
|
void | swap (Mem_bal &&cell) |
| Swap two Mem_bal. More...
|
|
void | clear () |
| Reset the object. More...
|
|
const local_index & | getStartId (local_index part_id) const |
| Get the start index of the selected element. More...
|
|
const local_index & | getStopId (local_index part_id) const |
| Get the stop index of the selected element. More...
|
|
const local_index & | get_lin (const local_index *part_id) const |
| get_lin More...
|
|
| Mem_bal (size_t slot) |
|
void | set_slot (size_t slot) |
|