OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
vector_custd_ker< T, layout_base > Struct Template Reference

grid interface available when on gpu More...

Detailed Description

template<typename T, template< typename > class layout_base>
struct vector_custd_ker< T, layout_base >

grid interface available when on gpu

Template Parameters
n_bufnumber of template buffers

Definition at line 19 of file map_vector_std_cuda_ker.cuh.

Public Types

typedef vector_custd_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 memory_traits_inte< aggregate< T_ > >::type layout_type
 Type of the encapsulation memory parameter.
 
typedef grid_base< 1, T_, CudaMemory, typenamememory_traits_inte< 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.
 

Public Member Functions

__device__ unsigned int size () const
 Return the size of the vector.
 
__device__ unsigned int capacity () const
 return the maximum capacity of the vector before reallocation
 
__device__ auto at (size_t id) const -> decltype(base.template get< 0 >(0))
 Get an element of the vector.
 
__device__ auto at (size_t id) -> decltype(base.template get< 0 >(0))
 Get an element of the vector.
 
__device__ auto get (size_t id) const -> decltype(base.template get< 0 >(0))
 Get an element of the vector.
 
__device__ auto get (size_t id) -> decltype(base.template get< 0 >(0))
 Get an element of the vector.
 
__device__ __host__ void * getPointer ()
 Return the pointer to the chunk of memory.
 
__device__ __host__ const void * getPointer () const
 Return the pointer to the chunk of memory.
 
 vector_custd_ker (int v_size, const vector_gpu_ker< T_, layout_base > &cpy)
 

Data Fields

unsigned int v_size
 
vector_gpu_ker< T_, layout_base > base
 1-D static grid
 

Member Typedef Documentation

◆ container

template<typename T , template< typename > class layout_base>
typedef grid_base<1,T_,CudaMemory,typenamememory_traits_inte<T_>::type>::container vector_custd_ker< T, layout_base >::container

Object container for T, it is the return type of get_o it return a object type trough.

Definition at line 43 of file map_vector_std_cuda_ker.cuh.

◆ layout_type

template<typename T , template< typename > class layout_base>
typedef memory_traits_inte<aggregate<T_>>::type vector_custd_ker< T, layout_base >::layout_type

Type of the encapsulation memory parameter.

Definition at line 39 of file map_vector_std_cuda_ker.cuh.

◆ self_type

template<typename T , template< typename > class layout_base>
typedef vector_custd_ker<T,layout_base> vector_custd_ker< T, layout_base >::self_type

Definition at line 21 of file map_vector_std_cuda_ker.cuh.

◆ T_

template<typename T , template< typename > class layout_base>
typedef apply_transform<layout_base,T>::type vector_custd_ker< T, layout_base >::T_

Definition at line 23 of file map_vector_std_cuda_ker.cuh.

◆ value_type

template<typename T , template< typename > class layout_base>
typedef T_ vector_custd_ker< T, layout_base >::value_type

Type of the value the vector is storing.

Definition at line 46 of file map_vector_std_cuda_ker.cuh.

◆ yes_i_am_vector

template<typename T , template< typename > class layout_base>
typedef int vector_custd_ker< T, layout_base >::yes_i_am_vector

it define that it is a vector

Definition at line 36 of file map_vector_std_cuda_ker.cuh.

Constructor & Destructor Documentation

◆ vector_custd_ker() [1/2]

template<typename T , template< typename > class layout_base>
vector_custd_ker< T, layout_base >::vector_custd_ker ( )
inline

Definition at line 150 of file map_vector_std_cuda_ker.cuh.

◆ vector_custd_ker() [2/2]

template<typename T , template< typename > class layout_base>
vector_custd_ker< T, layout_base >::vector_custd_ker ( int  v_size,
const vector_gpu_ker< T_, layout_base > &  cpy 
)
inline

Definition at line 153 of file map_vector_std_cuda_ker.cuh.

Member Function Documentation

◆ at() [1/2]

template<typename T , template< typename > class layout_base>
__device__ auto vector_custd_ker< T, layout_base >::at ( size_t  id) -> decltype(base.template get<0>(0))
inline

Get an element of the vector.

Get an element of the vector

Template Parameters
pProperty to get
Parameters
idElement to get
Returns
the element value requested

Definition at line 94 of file map_vector_std_cuda_ker.cuh.

◆ at() [2/2]

template<typename T , template< typename > class layout_base>
__device__ auto vector_custd_ker< T, layout_base >::at ( size_t  id) const -> decltype(base.template get<0>(0))
inline

Get an element of the vector.

Get an element of the vector

Template Parameters
pProperty to get
Parameters
idElement to get
Returns
the element value requested

Definition at line 79 of file map_vector_std_cuda_ker.cuh.

◆ capacity()

template<typename T , template< typename > class layout_base>
__device__ unsigned int vector_custd_ker< T, layout_base >::capacity ( ) const
inline

return the maximum capacity of the vector before reallocation

Returns
the capacity of the vector

Definition at line 64 of file map_vector_std_cuda_ker.cuh.

◆ get() [1/2]

template<typename T , template< typename > class layout_base>
__device__ auto vector_custd_ker< T, layout_base >::get ( size_t  id) -> decltype(base.template get<0>(0))
inline

Get an element of the vector.

Get an element of the vector

Template Parameters
pProperty to get
Parameters
idElement to get
Returns
the element value requested

Definition at line 124 of file map_vector_std_cuda_ker.cuh.

◆ get() [2/2]

template<typename T , template< typename > class layout_base>
__device__ auto vector_custd_ker< T, layout_base >::get ( size_t  id) const -> decltype(base.template get<0>(0))
inline

Get an element of the vector.

Get an element of the vector

Template Parameters
pProperty to get
Parameters
idElement to get
Returns
the element value requested

Definition at line 109 of file map_vector_std_cuda_ker.cuh.

◆ getPointer() [1/2]

template<typename T , template< typename > class layout_base>
__device__ __host__ void * vector_custd_ker< T, layout_base >::getPointer ( )
inline

Return the pointer to the chunk of memory.

Returns
the pointer to the chunk of memory

Definition at line 134 of file map_vector_std_cuda_ker.cuh.

◆ getPointer() [2/2]

template<typename T , template< typename > class layout_base>
__device__ __host__ const void * vector_custd_ker< T, layout_base >::getPointer ( ) const
inline

Return the pointer to the chunk of memory.

Returns
the pointer to the chunk of memory

Definition at line 144 of file map_vector_std_cuda_ker.cuh.

◆ size()

template<typename T , template< typename > class layout_base>
__device__ unsigned int vector_custd_ker< T, layout_base >::size ( ) const
inline

Return the size of the vector.

Returns
the size

Definition at line 53 of file map_vector_std_cuda_ker.cuh.

Field Documentation

◆ base

template<typename T , template< typename > class layout_base>
vector_gpu_ker<T_,layout_base> vector_custd_ker< T, layout_base >::base

1-D static grid

Definition at line 31 of file map_vector_std_cuda_ker.cuh.

◆ v_size

template<typename T , template< typename > class layout_base>
unsigned int vector_custd_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 28 of file map_vector_std_cuda_ker.cuh.


The documentation for this struct was generated from the following file: