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. More... | |
void | add (const T &v) |
It insert a new object on the vector, eventually it reallocate the grid. More... | |
void | add (T &&v) |
It insert a new object on the vector, eventually it reallocate the grid. More... | |
void | add () |
Add an empty object (it call the default constructor () ) at the end of the vector. More... | |
void | erase (typename std::vector< T >::iterator start, typename std::vector< T >::iterator end) |
Erase the elements from start to end. More... | |
void | remove (size_t key) |
Remove one entry from the vector. More... | |
T * | begin () |
Return an std compatible iterator to the first element. More... | |
T * | end () |
Return an std compatible iterator to the past the last element. More... | |
const T * | begin () const |
Return an std compatible iterator to the first element. More... | |
const T * | end () const |
Return an std compatible iterator to the past the last element. More... | |
T & | last () |
Get the last element. More... | |
const T & | last () const |
Get the last element. More... | |
template<unsigned int p> | |
T & | get (size_t id) |
Get an element of the vector. More... | |
void | setMemory (PtrMemory &mem) |
template<unsigned int p> | |
const T & | get (size_t id) const |
Get an element of the vector. More... | |
T & | get (size_t id) |
Get an element of the vector. More... | |
const T & | get (size_t id) const |
Get an element of the vector. More... | |
void | fill (unsigned char fl) |
it fill all the memory of fl patterns More... | |
void | reserve (size_t ns) |
reserve a memory space in advance to avoid reallocation More... | |
vector () noexcept | |
Constructor, vector of size 0. | |
vector (size_t sz) noexcept | |
Constructor, vector of size sz. | |
vector (const vector< T, PtrMemory, layout, layout_base, gp, STD_VECTOR > &v) noexcept | |
Constructor from another vector. | |
vector (vector< T, PtrMemory, layout, layout_base, gp, STD_VECTOR > &&v) noexcept | |
Constructor from another vector. | |
~vector () noexcept | |
destructor | |
void | swap (openfpm::vector< T, PtrMemory, layout, layout_base, gp, STD_VECTOR > &v) |
vector< T, HeapMemory, layout, layout_base, grow_policy_double, STD_VECTOR > & | operator= (const vector< T, HeapMemory, layout, layout_base, grow_policy_double, STD_VECTOR > &v) |
Operator= copy the vector into another. More... | |
vector< T, HeapMemory, layout, layout_base, grow_policy_double, STD_VECTOR > & | operator= (vector< T, HeapMemory, layout, layout_base, grow_policy_double, STD_VECTOR > &&v) |
Operator= copy the vector into another. More... | |
bool | operator!= (const vector< T, HeapMemory, layout, layout_base, grow_policy_double, STD_VECTOR > &v) const |
Check that two vectors are equal. More... | |
bool | operator== (const vector< T, HeapMemory, layout, layout_base, grow_policy_double, STD_VECTOR > &v) const |
Check that two vectors are not equal. More... | |
vector_key_iterator | getIterator () const |
Get iterator. More... | |
void * | getPointer () |
Return the pointer to the chunk of memory. More... | |
const void * | getPointer () const |
Return the pointer to the chunk of memory. More... | |
size_t | getLastError () |
Return the last error. More... | |
void | vector_overflow (size_t v1) const |
check that the id does not overflow the buffer More... | |
long int | who () |
Static Public Member Functions | |
static bool | noPointers () |
This class has pointer inside. More... | |
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. | |
|
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 88 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 105 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 117 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the first element.
Definition at line 163 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the first element.
Definition at line 183 of file map_vector_std_ptr.hpp.
|
inline |
Remove all the element from the vector.
Definition at line 71 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the past the last element.
Definition at line 173 of file map_vector_std_ptr.hpp.
|
inline |
Return an std compatible iterator to the past the last element.
Definition at line 193 of file map_vector_std_ptr.hpp.
|
inline |
Erase the elements from start to end.
start | element |
end | element |
Definition at line 134 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 331 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 241 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 270 of file map_vector_std_ptr.hpp.
|
inline |
Get an element of the vector.
id | element to get |
Definition at line 292 of file map_vector_std_ptr.hpp.
|
inline |
Get an element of the vector.
id | element to get |
Definition at line 311 of file map_vector_std_ptr.hpp.
|
inline |
|
inline |
|
inline |
Return the pointer to the chunk of memory.
Definition at line 493 of file map_vector_std_ptr.hpp.
|
inline |
Return the pointer to the chunk of memory.
Definition at line 506 of file map_vector_std_ptr.hpp.
|
inline |
Get the last element.
Definition at line 203 of file map_vector_std_ptr.hpp.
|
inline |
Get the last element.
Definition at line 220 of file map_vector_std_ptr.hpp.
|
inlinestatic |
|
inline |
Check that two vectors are equal.
vector | to compare |
Definition at line 453 of file map_vector_std_ptr.hpp.
|
inline |
Operator= copy the vector into another.
Definition at line 419 of file map_vector_std_ptr.hpp.
|
inline |
Operator= copy the vector into another.
v | vector to copy |
Definition at line 436 of file map_vector_std_ptr.hpp.
|
inline |
Check that two vectors are not equal.
vector | to compare |
Definition at line 467 of file map_vector_std_ptr.hpp.
|
inline |
Remove one entry from the vector.
key | element to remove |
Definition at line 147 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 345 of file map_vector_std_ptr.hpp.
|
inline |
\ brief Resize the vector to contain n elements
slot | number of elements |
Definition at line 57 of file map_vector_std_ptr.hpp.
|
inline |
swap the content of the vector
v | vector to be swapped with |
Definition at line 406 of file map_vector_std_ptr.hpp.
|
inline |
check that the id does not overflow the buffer
v1 | to check |
Definition at line 539 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.