grid interface available when on gpu More...
Public Types | |
| typedef vector_gpu_ker< T, layout_base > | self_type |
| typedef apply_transform< layout_base, T >::type | T_ |
| typedef int | yes_i_am_vector |
| it define that it is a vector | |
| typedef layout_base< T_ >::type | layout_type |
| Type of the encapsulation memory parameter. | |
| typedef grid_base< 1, T_, CudaMemory, typename layout_base< T_ >::type >::container | container |
| Object container for T, it is the return type of get_o it return a object type trough. | |
| typedef T_ | value_type |
| Type of the value the vector is storing. | |
| typedef int | yes_has_check_device_pointer |
| Indicate this structure has a function to check the device pointer. | |
Public Member Functions | |
| __device__ __host__ bool | check_bound (size_t v1) const |
| Check that the key is inside the grid. More... | |
| __device__ __host__ unsigned int | size () const |
| Return the size of the vector. More... | |
| __host__ __device__ size_t | size_local () const |
| __device__ __host__ unsigned int | capacity () const |
| return the maximum capacity of the vector before reallocation More... | |
| template<unsigned int p> | |
| __device__ __host__ auto | get (unsigned int id) const -> decltype(base.template get< p >(grid_key_dx< 1 >(0))) |
| Get an element of the vector. More... | |
| template<unsigned int p> | |
| __device__ __host__ auto | getProp (unsigned int id) const -> decltype(base.template get< p >(grid_key_dx< 1 >(0))) |
| Get an element of the vector. More... | |
| template<unsigned int p, typename key_type > | |
| __device__ __host__ auto | getProp (key_type id) const -> decltype(base.template get< p >(grid_key_dx< 1 >(0))) |
| Get an element of the vector. More... | |
| __device__ __host__ auto | get (unsigned int id) -> decltype(base.get_o(grid_key_dx< 1 >(id))) |
| Get an element of the vector. More... | |
| __device__ __host__ auto | get (unsigned int id) const -> const decltype(base.get_o(grid_key_dx< 1 >(id))) |
| Get an element of the vector. More... | |
| __device__ __host__ auto | get_o (unsigned int id) const -> decltype(base.get_o(grid_key_dx< 1 >(id))) |
| Get an element of the vector. More... | |
| __device__ __host__ auto | get_o (unsigned int id) -> decltype(base.get_o(grid_key_dx< 1 >(id))) |
| Get an element of the vector. More... | |
| auto | last () const -> decltype(base.get_o(grid_key_dx< 1 >(0))) |
| Get the last element of the vector. More... | |
| template<unsigned int p> | |
| __device__ __host__ auto | get (unsigned int id) -> decltype(base.template get< p >(grid_key_dx< 1 >(0))) |
| Get an element of the vector. More... | |
| auto | last () -> decltype(base.get_o(grid_key_dx< 1 >(0))) |
| Get the last element of the vector. More... | |
| vector_gpu_ker (int v_size, const grid_gpu_ker< 1, T_, layout_base, grid_sm< 1, void >> &cpy) | |
| vector_gpu_ker (const vector_gpu_ker_ref< T, layout_base > &vref) | |
| void | constructor_impl (int v_size, const grid_gpu_ker< 1, T_, layout_base, grid_sm< 1, void >> &cpy) |
| implementation of the constructor More... | |
| void | constructor_impl (int v_size, const grid_gpu_ker_ref< 1, T_, layout_base, grid_sm< 1, void >> &cpy) |
| implementation of the constructor More... | |
| __device__ void | set (int id, const container &obj) |
| Set the object id to obj. More... | |
| template<unsigned int p> | |
| __device__ __host__ void * | getPointer () |
| Get the pointer for the property p. More... | |
| template<unsigned int p> | |
| __device__ __host__ const void * | getPointer () const |
| Get the pointer for the property p. More... | |
| template<typename encap_S , unsigned int ... args> | |
| void | set_o (unsigned int i, const encap_S &obj) |
| It set an element of the vector from a object that is a subset of the vector properties. More... | |
| __device__ void | set (unsigned int id, const vector_gpu_ker< T_, layout_base > &v, unsigned int src) |
| Set the element of the vector v from another element of another vector. More... | |
| template<unsigned int ... prp> | |
| __device__ void | set (unsigned int id, const vector_gpu_ker< T_, layout_base > &v, unsigned int src) |
| Set the element of the vector v from another element of another vector. More... | |
| __host__ ite_gpu< 1 > | getGPUIterator (size_t n_thr=default_kernel_wg_threads_) const |
| Get an iterator for the GPU. | |
| ite_gpu< 1 > | getDomainIteratorGPU (size_t n_thr=default_kernel_wg_threads_) const |
| Get a domain iterator for the GPU. | |
| void | init () const |
| __host__ __device__ auto | value (unsigned int p) -> decltype(base.template get< 0 >(grid_key_dx< 1 >(0))) |
| ite_gpu< 1 > | getGPUIteratorTo (size_t stop, size_t n_thr=default_kernel_wg_threads_) const |
| Get an iterator for the GPU. | |
| __host__ vector_gpu_ker< T, layout_base > & | operator= (const vector_gpu_ker< T, layout_base > &v) |
| operator= this operator absorb the pointers, consider that this object wrap device pointers More... | |
| __device__ __host__ vector_gpu_ker< T, layout_base > & | getVector () |
| __device__ __host__ const vector_gpu_ker< T, layout_base > & | getVector () const |
| __device__ grid_gpu_ker< 1, T_, layout_base, grid_sm< 1, void > > & | getBase () |
| Return the base. More... | |
| void * | internal_get_size_pointer () |
| void | print_size () |
Data Fields | |
| unsigned int | v_size |
| grid_gpu_ker< 1, T_, layout_base, grid_sm< 1, void > > | base |
| 1-D static grid | |
grid interface available when on gpu
| n_buf | number of template buffers |
Definition at line 121 of file map_vector_cuda_ker.cuh.
|
inline |
return the maximum capacity of the vector before reallocation
Definition at line 186 of file map_vector_cuda_ker.cuh.
|
inline |
Check that the key is inside the grid.
| key |
Definition at line 142 of file map_vector_cuda_ker.cuh.
|
inline |
implementation of the constructor
| v_size | number of elements |
Definition at line 400 of file map_vector_cuda_ker.cuh.
|
inline |
implementation of the constructor
| v_size | number of elements |
Definition at line 411 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
Get an element of the vector
| id | Element to get |
Definition at line 254 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
Get an element of the vector
| p | Property to get |
| id | Element to get |
Definition at line 358 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
Get an element of the vector
| id | Element to get |
Definition at line 275 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
Get an element of the vector
| p | Property to get |
| id | Element to get |
Definition at line 202 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
exactly as get, exist to keep the compatibility with grid
| id | Element to get |
Definition at line 323 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
exactly as get, exist to keep the compatibility with grid
| id | Element to get |
Definition at line 299 of file map_vector_cuda_ker.cuh.
|
inline |
|
inline |
Get the pointer for the property p.
| property | p |
copy the element
Definition at line 439 of file map_vector_cuda_ker.cuh.
|
inline |
Get the pointer for the property p.
| property | p |
copy the element
Definition at line 450 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
Get an element of the vector
| p | Property to get |
| id | Element to get |
Definition at line 240 of file map_vector_cuda_ker.cuh.
|
inline |
Get an element of the vector.
Get an element of the vector
| p | Property to get |
| id | Element to get |
Definition at line 223 of file map_vector_cuda_ker.cuh.
|
inline |
Get the last element of the vector.
Definition at line 375 of file map_vector_cuda_ker.cuh.
|
inline |
Get the last element of the vector.
Definition at line 340 of file map_vector_cuda_ker.cuh.
|
inline |
operator= this operator absorb the pointers, consider that this object wrap device pointers
| object | to copy |
Definition at line 562 of file map_vector_cuda_ker.cuh.
|
inline |
Set the object id to obj.
| id | element |
| obj | object (encapsulated) |
copy the element
Definition at line 423 of file map_vector_cuda_ker.cuh.
|
inline |
Set the element of the vector v from another element of another vector.
| id | element id |
| v | vector source |
| src | source element |
Definition at line 489 of file map_vector_cuda_ker.cuh.
|
inline |
Set the element of the vector v from another element of another vector.
| id | element id |
| v | vector source |
| src | source element |
Definition at line 507 of file map_vector_cuda_ker.cuh.
|
inline |
It set an element of the vector from a object that is a subset of the vector properties.
The number of properties in the source vector must be smaller than the destination all the properties of S must be mapped so if S has 3 properties 3 numbers for args are required
| encap_S | object that encapsulate the object |
| args | ids of the properties to map the object to |
| i | element to set |
| obj | object that encapsulate the object |
| v | source vector |
Definition at line 471 of file map_vector_cuda_ker.cuh.
|
inline |
Return the size of the vector.
Definition at line 170 of file map_vector_cuda_ker.cuh.
| unsigned int openfpm::vector_gpu_ker< T, layout_base >::v_size |
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 130 of file map_vector_cuda_ker.cuh.