Definition at line 13 of file map_vector_std_ptr.hpp.
Public Types | |
typedef int | yes_i_am_vector |
it define that it is a vector | |
typedef vector_key_iterator | iterator_key |
iterator for the vector | |
typedef T | value_type |
Type of the value the vector is storing. | |
Public Member Functions | |
size_t | size () const |
return the size of the vector | |
void | resize (size_t slot) |
void | clear () |
Remove all the element from the vector. | |
void | add (const T &v) |
It insert a new object on the vector, eventually it reallocate the grid. | |
void | add (T &&v) |
It insert a new object on the vector, eventually it reallocate the grid. | |
void | add () |
Add an empty object (it call the default constructor () ) at the end of the vector. | |
void | erase (typename std::vector< T >::iterator start, typename std::vector< T >::iterator end) |
Erase the elements from start to end. | |
void | remove (size_t key) |
Remove one entry from the vector. | |
T * | begin () |
Return an std compatible iterator to the first element. | |
T * | end () |
Return an std compatible iterator to the past the last element. | |
const T * | begin () const |
Return an std compatible iterator to the first element. | |
const T * | end () const |
Return an std compatible iterator to the past the last element. | |
T & | last () |
Get the last element. | |
const T & | last () const |
Get the last element. | |
template<unsigned int p> | |
T & | get (size_t id) |
Get an element of the vector. | |
void | setMemory (PtrMemory &mem) |
template<unsigned int p> | |
const T & | get (size_t id) const |
Get an element of the vector. | |
T & | get (size_t id) |
Get an element of the vector. | |
const T & | get (size_t id) const |
Get an element of the vector. | |
void | fill (unsigned char fl) |
it fill all the memory of fl patterns | |
void | reserve (size_t ns) |
reserve a memory space in advance to avoid reallocation | |
vector () noexcept | |
Constructor, vector of size 0. | |
vector (size_t sz) noexcept | |
Constructor, vector of size sz. | |
vector (const vector< T, PtrMemory, layout_base, gp, STD_VECTOR > &v) noexcept | |
Constructor from another vector. | |
vector (vector< T, PtrMemory, layout_base, gp, STD_VECTOR > &&v) noexcept | |
Constructor from another vector. | |
~vector () noexcept | |
destructor | |
void | swap (openfpm::vector< T, PtrMemory, layout_base, gp, STD_VECTOR > &v) |
vector< T, HeapMemory, layout_base, grow_policy_double, STD_VECTOR > & | operator= (const vector< T, HeapMemory, layout_base, grow_policy_double, STD_VECTOR > &v) |
Operator= copy the vector into another. | |
vector< T, HeapMemory, layout_base, grow_policy_double, STD_VECTOR > & | operator= (vector< T, HeapMemory, layout_base, grow_policy_double, STD_VECTOR > &&v) |
Operator= copy the vector into another. | |
bool | operator!= (const vector< T, HeapMemory, layout_base, grow_policy_double, STD_VECTOR > &v) const |
Check that two vectors are equal. | |
bool | operator== (const vector< T, HeapMemory, layout_base, grow_policy_double, STD_VECTOR > &v) const |
Check that two vectors are not equal. | |
vector_key_iterator | getIterator () const |
Get iterator. | |
void * | getPointer () |
Return the pointer to the chunk of memory. | |
const void * | getPointer () const |
Return the pointer to the chunk of memory. | |
size_t | getLastError () |
Return the last error. | |
void | vector_overflow (size_t v1) const |
check that the id does not overflow the buffer | |
Static Public Member Functions | |
static bool | noPointers () |
This class has pointer inside. | |
Private Types | |
typedef memory_traits_lin< T >::type | layout |
Memory layout. | |
template<typename lb > | |
using | layout_base = memory_traits_lin< lb > |
function for memory layout | |
Private Attributes | |
size_t | v_size |
PtrMemory * | mem |
1-D static grid | |
size_t | err_code |
Error code. | |
typedef vector_key_iterator vector< T, PtrMemory, memory_traits_lin, gp, STD_VECTOR >::iterator_key |
iterator for the vector
Definition at line 38 of file map_vector_std_ptr.hpp.
|
private |
Memory layout.
Definition at line 16 of file map_vector_std_ptr.hpp.
|
private |
function for memory layout
Definition at line 19 of file map_vector_std_ptr.hpp.
typedef T vector< T, PtrMemory, memory_traits_lin, gp, STD_VECTOR >::value_type |
Type of the value the vector is storing.
Definition at line 40 of file map_vector_std_ptr.hpp.
typedef int vector< T, PtrMemory, memory_traits_lin, gp, STD_VECTOR >::yes_i_am_vector |
it define that it is a vector
Definition at line 35 of file map_vector_std_ptr.hpp.
|
inlinenoexcept |
Constructor, vector of size 0.
Definition at line 305 of file map_vector_std_ptr.hpp.
|
inlinenoexcept |
Constructor, vector of size sz.
Definition at line 311 of file map_vector_std_ptr.hpp.
|
inlinenoexcept |
Constructor from another vector.
Definition at line 317 of file map_vector_std_ptr.hpp.
|
inlinenoexcept |
Constructor from another vector.
Definition at line 325 of file map_vector_std_ptr.hpp.
|
inlinenoexcept |
destructor
Definition at line 332 of file map_vector_std_ptr.hpp.
|
inline |
Add an empty object (it call the default constructor () ) at the end of the vector.
Definition at line 102 of file map_vector_std_ptr.hpp.
|
inline |
It insert a new object on the vector, eventually it reallocate the grid.
v | element to add |
vector_isel<T>::value
Definition at line 79 of file map_vector_std_ptr.hpp.
|
inline |
It insert a new object on the vector, eventually it reallocate the grid.
v | element to add |
vector_isel<T>::value
Definition at line 93 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the first element.
Definition at line 139 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the first element.
Definition at line 159 of file map_vector_std_ptr.hpp.
|
inline |
Remove all the element from the vector.
Definition at line 65 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the past the last element.
Definition at line 149 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the past the last element.
Definition at line 169 of file map_vector_std_ptr.hpp.
|
inline |
Erase the elements from start to end.
start | element |
end | element |
Definition at line 116 of file map_vector_std_ptr.hpp.
|
inline |
it fill all the memory of fl patterns
WARNING does not assign a value to each element but it fill the memory Useful to fast set the memory to zero
fl | byte to fill |
Definition at line 289 of file map_vector_std_ptr.hpp.
|
inline |
Get an element of the vector.
p | must be 0 |
id | element to get |
Definition at line 211 of file map_vector_std_ptr.hpp.
|
inline |
Get an element of the vector.
id | element to get |
Definition at line 256 of file map_vector_std_ptr.hpp.
|
inline |
Get an element of the vector.
p | must be 0 |
id | element to get |
Definition at line 237 of file map_vector_std_ptr.hpp.
|
inline |
Get an element of the vector.
id | element to get |
Definition at line 272 of file map_vector_std_ptr.hpp.
|
inline |
|
inline |
|
inline |
Return the pointer to the chunk of memory.
Definition at line 438 of file map_vector_std_ptr.hpp.
|
inline |
Return the pointer to the chunk of memory.
Definition at line 448 of file map_vector_std_ptr.hpp.
|
inline |
Get the last element.
Definition at line 179 of file map_vector_std_ptr.hpp.
|
inline |
Get the last element.
Definition at line 193 of file map_vector_std_ptr.hpp.
|
inlinestatic |
|
inline |
Check that two vectors are equal.
vector | to compare |
Definition at line 379 of file map_vector_std_ptr.hpp.
|
inline |
Operator= copy the vector into another.
Definition at line 351 of file map_vector_std_ptr.hpp.
|
inline |
Operator= copy the vector into another.
v | vector to copy |
Definition at line 365 of file map_vector_std_ptr.hpp.
|
inline |
Check that two vectors are not equal.
vector | to compare |
Definition at line 393 of file map_vector_std_ptr.hpp.
|
inline |
Remove one entry from the vector.
key | element to remove |
Definition at line 126 of file map_vector_std_ptr.hpp.
|
inline |
reserve a memory space in advance to avoid reallocation
ns | number of element the memory has to store |
Definition at line 300 of file map_vector_std_ptr.hpp.
|
inline |
\ brief Resize the vector to contain n elements
slot | number of elements |
Definition at line 54 of file map_vector_std_ptr.hpp.
|
inline |
Definition at line 223 of file map_vector_std_ptr.hpp.
|
inline |
return the size of the vector
Definition at line 43 of file map_vector_std_ptr.hpp.
|
inline |
swap the content of the vector
v | vector to be swapped with |
Definition at line 341 of file map_vector_std_ptr.hpp.
|
inline |
check that the id does not overflow the buffer
v1 | to check |
Definition at line 478 of file map_vector_std_ptr.hpp.
|
private |
Error code.
Definition at line 30 of file map_vector_std_ptr.hpp.
|
private |
1-D static grid
Definition at line 27 of file map_vector_std_ptr.hpp.
|
private |
Actual size of the vector, warning: it is not the space allocated in grid grid size increase by a fixed amount every time we need a vector bigger than the actually allocated space
Definition at line 24 of file map_vector_std_ptr.hpp.