grid interface available when on gpu More...
grid interface available when on gpu
n_buf | number of template buffers |
Definition at line 196 of file tokernel_transformation.hpp.
#include <tokernel_transformation.hpp>
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... | |
__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... | |
__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. More... | |
ite_gpu< 1 > | getGPUIteratorTo (size_t stop, size_t n_thr=default_kernel_wg_threads_) const |
Get an iterator for the GPU. More... | |
__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__ 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 | |
|
inline |
return the maximum capacity of the vector before reallocation
Definition at line 181 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 363 of file map_vector_cuda_ker.cuh.
|
inline |
implementation of the constructor
v_size | number of elements |
Definition at line 374 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 197 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 217 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 238 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 321 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 262 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 286 of file map_vector_cuda_ker.cuh.
|
inline |
|
inline |
Get an iterator for the GPU.
Definition at line 484 of file map_vector_cuda_ker.cuh.
|
inline |
Get an iterator for the GPU.
Definition at line 496 of file map_vector_cuda_ker.cuh.
|
inline |
Get the pointer for the property p.
property | p |
copy the element
Definition at line 402 of file map_vector_cuda_ker.cuh.
|
inline |
Get the pointer for the property p.
property | p |
copy the element
Definition at line 413 of file map_vector_cuda_ker.cuh.
|
inline |
Get the last element of the vector.
Definition at line 303 of file map_vector_cuda_ker.cuh.
|
inline |
Get the last element of the vector.
Definition at line 338 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 509 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 386 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 452 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 470 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 434 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.