8 #ifndef OPENFPM_DATA_SRC_GRID_GRID_GPU_HPP_
9 #define OPENFPM_DATA_SRC_GRID_GRID_GPU_HPP_
27 template<unsigned int dim, typename T, typename S=CudaMemory , typename Mem = typename memory_traits_inte< typename T::type >::type >
31 bool is_mem_init =
false;
101 boost::fusion::for_each(
data_,all);
108 return boost::fusion::at_c<p>(
data_).mem_r->operator[](
g1.
LinId(v1));
113 return boost::fusion::at_c<p>(
data_).mem_r->operator[](
g1.
LinId(v1));
150 data_.mem.set_memory(mem);
196 template<
unsigned int dim,
typename T>
encapg< dim, T, Mem > container
Object container for T, it is the return type of get_o it return a object type trough.
This is an N-dimensional grid or an N-dimensional array with memory_traits_inte layout.
void setDimensions(std::vector< size_t > &sz)
Set the grid dimensions.
grid_key_dx is the key to access any element in the grid
void setMemory()
Create the object that provide memory.
Mem memory_conf
Memory traits.
size_t size() const
Return the size of the grid.
int yes_i_am_grid
it define that it is a grid
This class is an helper to get the return type of get for each property.
const grid_sm< dim, void > & getGrid() const
Return the internal grid information.
grid_key_dx_iterator< dim > getIterator()
Return a grid iterator.
void set_memory(memory &mem)
memory_traits_inte< typename T::type >::type memory_int
Definition of the layout.
grid_gpu(std::vector< size_t > &sz) THROW
Constructor it initialize the memory and give representation.
void swap(grid_sm< N, T > &g)
swap the grid_sm informations
void swap(grid_gpu< dim, T, S, Mem > &obj)
Swap the memory of another grid.
this class is a functor for "for_each" algorithm
inter_memc< T >::type type
for each element in the vector interleave memory_c
grid_gpu< dim, T > gpu
gpu
grid_sm< dim, void > g1
It store all the information regarding the grid.
encapg< dim, T, Mem > get_o(grid_key_dx< dim > &v1)
Get the of the selected element as a boost::fusion::vector.
grid_key_dx_iterator_sub< dim > getSubIterator(grid_key_dx< dim > &start, grid_key_dx< dim > &stop)
Return a sub-grid iterator.
this structure encapsulate an object of the grid
grid_key_d is the key to access any element in the grid
grid_cpu< dim, T > cpu
cpu
grid_key_dx< dim > access_key
Access the key.
mem_id LinId(const grid_key_dx< N > &gk, const char sum_id[N], const size_t(&bc)[N]) const
Linearization of the grid_key_dx with a specified shift.
const encapg< dim, T, Mem > get_o(grid_key_dx< dim > &v1) const
Get the of the selected element as a boost::fusion::vector.
grid_gpu() THROW
Default constructor.