Implementation of 1-D std::vector like structure. More...
#include <map_vector_std_cuda.hpp>
Data Structures | |
| struct | layout_base__ |
Public Types | |
| typedef int | yes_i_am_vector |
| it define that it is a vector | |
| typedef memory_traits_inte< T > | layout_base_ |
| typedef vector_key_iterator | iterator_key |
| iterator for the vector | |
| typedef T | value_type |
| Type of the value the vector is storing. | |
| typedef void | base_to_copy |
| typedef grow_policy_double | grow_policy |
| growing policy of this vector | |
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. 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. | |
| T & | last () |
| Get the last element. More... | |
| const T & | last () const |
| Get the last element. More... | |
| void | swap (vector< T, CudaMemory, memory_traits_inte, grow_policy_double, STD_VECTOR > &&v) |
| swap the memory between the two vector More... | |
| T & | at (int i) |
| T & | operator[] (int id) |
| Get an element of the vector. More... | |
| T & | get (int id) |
| Get an element of the vector. More... | |
| const T & | get (int 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 | 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, CudaMemory, memory_traits_inte, grow_policy_double, STD_VECTOR > &v) noexcept | |
| Constructor from another vector. | |
| vector (const std::initializer_list< T > &v) | |
| Initializer from constructor. More... | |
| vector (vector< T, CudaMemory, memory_traits_inte, grow_policy_double, STD_VECTOR > &&v) noexcept | |
| Constructor from another vector. | |
| template<class InputIt > | |
| vector (InputIt first, InputIt last) | |
| Constructor from iterators. | |
| ~vector () noexcept | |
| destructor | |
| void | swap (vector< T, CudaMemory, memory_traits_inte, grow_policy_double, STD_VECTOR > &v) |
| vector< T, CudaMemory, memory_traits_inte, grow_policy_double, STD_VECTOR > & | operator= (const vector< T, CudaMemory, memory_traits_inte, grow_policy_double, STD_VECTOR > &v) |
| Operator= copy the vector into another. More... | |
| vector_key_iterator | getIterator () const |
| Get an iterator over all the elements of the vector. More... | |
| vector_key_iterator | getIteratorTo (size_t k) const |
| Get iterator until a specified element. 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... | |
| template<unsigned int ... prp> | |
| void | hostToDevice () |
| Do nothing. | |
| template<unsigned int ... prp> | |
| void | deviceToHost () |
| Do nothing. | |
| template<unsigned int ... prp> | |
| void | deviceToHost (size_t start, size_t stop) |
| Do nothing. | |
| template<unsigned int ... prp> | |
| void | hostToDevice (size_t start, size_t stop) |
| Do nothing. | |
| vector_custd_ker< typename apply_transform< memory_traits_inte, aggregate< T > >::type, memory_traits_inte > | toKernel () |
| Convert the grid into a data-structure compatible for computing into GPU. 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... | |
Static Public Member Functions | |
| static bool | noPointers () |
| This class has pointer inside. More... | |
Private Types | |
| typedef memory_traits_inte< aggregate< T > >::type | layout |
Private Attributes | |
| vector< aggregate< T >, CudaMemory, memory_traits_inte, grow_policy_double > | base |
| 1-D static grid | |
| size_t | err_code = 0 |
| Error code. | |
Implementation of 1-D std::vector like structure.
this implementation is just a wrapper for the std::vector in the case of data where the members cannot be parsed see openFPM_data wiki for more information
| T | base type |
Definition at line 25 of file map_vector_std_cuda.hpp.
|
inline |
Initializer from constructor.
| v | Initializer list |
Definition at line 279 of file map_vector_std_cuda.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_cuda.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 108 of file map_vector_std_cuda.hpp.
|
inline |
Get an element of the vector.
| id | element to get |
Definition at line 188 of file map_vector_std_cuda.hpp.
|
inline |
Get an element of the vector.
| p | must be 0 |
| id | element to get |
Definition at line 206 of file map_vector_std_cuda.hpp.
|
inline |
Get an element of the vector.
| id | element to get |
Definition at line 222 of file map_vector_std_cuda.hpp.
|
inline |
Get an element of the vector.
| id | element to get |
Definition at line 237 of file map_vector_std_cuda.hpp.
|
inline |
Get an iterator over all the elements of the vector.
Definition at line 339 of file map_vector_std_cuda.hpp.
|
inline |
Get iterator until a specified element.
| k | key |
Definition at line 351 of file map_vector_std_cuda.hpp.
|
inline |
|
inline |
Return the pointer to the chunk of memory.
Definition at line 361 of file map_vector_std_cuda.hpp.
|
inline |
Return the pointer to the chunk of memory.
Definition at line 371 of file map_vector_std_cuda.hpp.
|
inline |
Get the last element.
Definition at line 127 of file map_vector_std_cuda.hpp.
|
inline |
Get the last element.
Definition at line 141 of file map_vector_std_cuda.hpp.
|
inlinestatic |
|
inline |
Operator= copy the vector into another.
| v | vector to copy |
Definition at line 327 of file map_vector_std_cuda.hpp.
|
inline |
Get an element of the vector.
| id | element to get |
Definition at line 172 of file map_vector_std_cuda.hpp.
|
inline |
reserve a memory space in advance to avoid reallocation
| ns | number of element the memory has to store |
Definition at line 250 of file map_vector_std_cuda.hpp.
|
inline |
\ brief Resize the vector to contain n elements
| slot | number of elements |
Definition at line 71 of file map_vector_std_cuda.hpp.
|
inline |
swap the memory between the two vector
| v | vector to swap |
Definition at line 155 of file map_vector_std_cuda.hpp.
|
inline |
swap the content of the vector
| v | vector to be swapped with |
Definition at line 314 of file map_vector_std_cuda.hpp.
|
inline |
Convert the grid into a data-structure compatible for computing into GPU.
The object created can be considered like a reference of the original
Definition at line 417 of file map_vector_std_cuda.hpp.
|
inline |
check that the id does not overflow the buffer
| v1 | id to check |
Definition at line 449 of file map_vector_std_cuda.hpp.