OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer > Class Template Reference

This is an N-dimensional grid or an N-dimensional array with memory_traits_lin layout. More...

Detailed Description

template<unsigned int dim, typename T, typename S, typename linearizer>
class grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >

This is an N-dimensional grid or an N-dimensional array with memory_traits_lin layout.

it is basically an N-dimensional Cartesian grid

Template Parameters
dimDimensionality of the grid
Ttype of object the grid store
Stype of memory HeapMemory CudaMemory
layoutmemory layout

Defining the grid size on each dimension

size_t sz[3] = {16,16,16};

Definition and allocation of a 3D grid on CPU memory

c3.setMemory();

Access a grid c3 of size sz on each direction

timer t;
t.start();
for (size_t i = 0 ; i < sz ; i++)
{
for (size_t j = 0 ; j < sz ; j++)
{
for (size_t k = 0 ; k < sz ; k++)
{
kk.set(i,j,k);
c3.template get<P::x>(kk) = 1.1f;
c3.template get<P::y>(kk) = 1.2f;
c3.template get<P::z>(kk) = 1.3f;
c3.template get<P::s>(kk) = 1.0f;
c3.template get<P::v>(kk)[0] = 1.0f;
c3.template get<P::v>(kk)[1] = 2.0f;
c3.template get<P::v>(kk)[2] = 3.0f;
c3.template get<P::t>(kk)[0][0] = 1.0f;
c3.template get<P::t>(kk)[0][1] = 2.0f;
c3.template get<P::t>(kk)[0][2] = 3.0f;
c3.template get<P::t>(kk)[1][0] = 4.0f;
c3.template get<P::t>(kk)[1][1] = 5.0f;
c3.template get<P::t>(kk)[1][2] = 6.0f;
c3.template get<P::t>(kk)[2][0] = 7.0f;
c3.template get<P::t>(kk)[2][1] = 8.0f;
c3.template get<P::t>(kk)[2][2] = 9.0f;
}
}
}
Test structure used for several test.
grid_key_dx is the key to access any element in the grid
Definition grid_key.hpp:19
__device__ __host__ void set(a v, T...t)
set the Key from a list of numbers
Definition grid_key.hpp:400
Class for cpu time benchmarking.
Definition timer.hpp:28
void start()
Start the timer.
Definition timer.hpp:90

Access an N-dimensional grid with an iterator

Iterate only on a sub-set of the grid

Get the full-object in an N-dimensional grid

grid_key_dx_iterator<dim> key_it = c3.getIterator();
while (key_it.isNext())
{
grid_key_dx<dim> kk = key_it.get();
// Here we get a reference to the object, in reality we get an encapsulated object reference encapc
auto v = c3.get_o(kk);
// An encapsulated object can be accessed like that
// (this will change the value in the grid)
v.template get<P::x>() = 1.1f;
v.template get<P::y>() = 1.2f;
v.template get<P::z>() = 1.3f;
v.template get<P::s>() = 1.0f;
v.template get<P::v>()[0] = 1.0f;
v.template get<P::v>()[1] = 2.0f;
v.template get<P::v>()[2] = 3.0f;
v.template get<P::t>()[0][0] = 1.0f;
v.template get<P::t>()[0][1] = 2.0f;
v.template get<P::t>()[0][2] = 3.0f;
v.template get<P::t>()[1][0] = 4.0f;
v.template get<P::t>()[1][1] = 5.0f;
v.template get<P::t>()[1][2] = 6.0f;
v.template get<P::t>()[2][0] = 7.0f;
v.template get<P::t>()[2][1] = 8.0f;
v.template get<P::t>()[2][2] = 9.0f;
// From an encapsulated reference object you can create
// an object
Point_test<float> obj = c3.get_o(kk);
// And do some operation
obj.fill();
// Note change obj does not change the grid
++key_it;
}
void fill()
fill
const grid_key_dx< dim > & get() const
Get the actual key.
bool isNext()
Check if there is the next element.

Create a grid g1 and copy into another g2

size_t sz[] = {16,16};
typedef Box<2,float> b;
g1.setMemory();
auto it = g1.getIterator();
while (it.isNext())
{
auto key = it.get();
g1.get<b::p1>(key)[0] = key.get(0);
g1.get<b::p2>(key)[1] = key.get(1);
++it;
}
g2 = g1;
This class represent an N-dimensional box.
Definition Box.hpp:61
linearizer g1
This is a structure that store all information related to the grid and how indexes are linearized.

Definition at line 112 of file map_grid.hpp.

#include <map_grid.hpp>

+ Inheritance diagram for grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >:

Public Types

typedef memory_traits_lin< T >::type layout
 type of layout of the structure
 
typedef grid_base_impl< dim, T, S, memory_traits_lin >::container container
 Object container for T, it is the return type of get_o it return a object type trough.
 
typedef void grow_policy
 grid_base has no grow policy
 
typedef grid_key_dx< dim > base_key
 type that identify one point in the grid
 
typedef grid_key_dx_iterator_sub< dim > sub_grid_iterator_type
 sub-grid iterator type
 
typedef grid_base_impl< dim, T, S, memory_traits_lin >::linearizer_type linearizer_type
 linearizer type Z-morton Hilbert curve , normal striding
 
- Public Types inherited from grid_base_impl< dim, T, S, memory_traits_lin, linearizer >
typedef layout layout_type
 memory layout
 
typedef grid_key_dx< dim > access_key
 Access key.
 
typedef T::type T_type
 boost::vector that describe the data type
 
typedef memory_traits_lin< T > layout_base_
 base layout type
 
typedef linearizer linearizer_type
 
typedef T background_type
 
typedef int yes_i_am_grid
 it define that this data-structure is a grid
 
typedef memory_traits_lin< typenameT::type >::type memory_lin
 Definition of the layout.
 
typedef encapc< dim, T, layoutcontainer
 Object container for T, it is the return type of get_o it return a object type trough.
 
typedef T value_type
 The object type the grid is storing.
 

Public Member Functions

 grid_base () THROW
 Default constructor.
 
 grid_base (const grid_base< dim, T, S, typename memory_traits_lin< T >::type > &g) THROW
 create a grid from another grid
 
 grid_base (const size_t &sz) THROW
 create a grid of size sz on each direction
 
 grid_base (const size_t(&sz)[dim]) THROW
 Constructor allocate memory.
 
template<unsigned int ... prp, typename S2 , typename header_type , typename ite_type , typename context_type >
void unpack_with_headers (ExtPreAlloc< S2 > &mem, ite_type &sub_it, header_type &headers, int ih, Unpack_stat &ps, context_type &context, rem_copy_opt opt=rem_copy_opt::NONE_OPT)
 
__host__ grid_base< dim, T, S > & operator= (const grid_base< dim, T, S > &g)
 It copy a grid.
 
grid_base< dim, T, S, typename memory_traits_lin< T >::type > & operator= (grid_base< dim, T, S, typename memory_traits_lin< T >::type > &&g)
 It copy a grid.
 
template<unsigned int id>
void * getDeviceBuffer ()
 It return the properties arrays.
 
void convert_key (grid_key_dx< dim > &key_out, const grid_key_dx< dim > &key_in) const
 In this case it just copy the key_in in key_out.
 
T & getBackgroundValue ()
 Get the background value.
 
T & getBackgroundValueAggr ()
 Get the background value.
 
template<unsigned int p>
void setBackgroundValue (const typename boost::mpl::at< typename T::type, boost::mpl::int_< p > >::type &val)
 Set the background value.
 
grid_base< dim, T, S, typename memory_traits_lin< T >::type > & operator= (const grid_base_impl< dim, T, S, memory_traits_lin > &base)
 assign operator
 
grid_base< dim, T, S, typename memory_traits_lin< T >::type > & operator= (grid_base_impl< dim, T, S, memory_traits_lin > &&base)
 assign operator
 
- Public Member Functions inherited from grid_base_impl< dim, T, S, memory_traits_lin, linearizer >
 grid_base_impl () THROW
 Default constructor.
 
 grid_base_impl (const grid_base_impl &g) THROW
 create a grid from another grid
 
 grid_base_impl (const size_t &sz) THROW
 create a grid of size sz on each direction
 
 grid_base_impl (const size_t(&sz)[dim]) THROW
 Constructor.
 
 ~grid_base_impl () THROW
 Destructor.
 
grid_base_impl< dim, T, S, memory_traits_lin > & operator= (const grid_base_impl< dim, T, S, memory_traits_lin > &g)
 It copy a grid.
 
grid_base_impl< dim, T, S, memory_traits_lin > & operator= (grid_base_impl< dim, T, S, memory_traits_lin > &&g)
 It copy a grid.
 
bool operator== (const grid_base_impl< dim, T, S, memory_traits_lin > &g)
 Compare two grids.
 
grid_base_impl< dim, T, S, memory_traits_linduplicate () const THROW
 create a duplicated version of the grid
 
int size (int i) const
 Get the size if the grid in the direction i.
 
size_t size () const
 return the size of the grid
 
const linearizer & getGrid () const
 Return the internal grid information.
 
void setMemory ()
 Create the object that provide memory.
 
void setMemory (S &m)
 Set the object that provide memory from outside.
 
auto getMemory () -> decltype(boost::fusion::at_c< p >(data_).getMemory())
 Return the memory object.
 
void setMemoryArray (S *m)
 Set the object that provide memory from outside.
 
void * getPointer ()
 Return a plain pointer to the internal data.
 
const void * getPointer () const
 Return a plain pointer to the internal data.
 
r_type insert (const grid_key_dx< dim > &v1)
 In this case insert is equivalent to get.
 
__device__ __host__ r_type get_usafe (const grid_key_dx< dim > &v1)
 Get the reference of the selected element.
 
int getBlockEdgeSize ()
 No blocks here, it return 1.
 
void setGPUInsertBuffer (unsigned int nb, unsigned int nt)
 No blocks here, it does nothing.
 
__device__ __host__ r_type get_unsafe (const grid_key_dx< dim > &v1) const
 Get the const reference of the selected element.
 
__device__ __host__ r_type get (const grid_key_dx< dim > &v1)
 Get the reference of the selected element.
 
__device__ __host__ r_type get (const grid_key_dx< dim > &v1) const
 Get the const reference of the selected element.
 
__device__ __host__ r_type get (const size_t lin_id)
 Get the reference of the selected element.
 
__device__ __host__ const r_type get (size_t lin_id) const
 Get the const reference of the selected element.
 
__device__ __host__ unsigned char getFlag (const grid_key_dx< dim > &v1) const
 Get the point flag (in this case just return 0)
 
encapc< dim, T, layoutget_o (const grid_key_dx< dim > &v1)
 Get the of the selected element as a boost::fusion::vector.
 
const encapc< dim, T, layoutget_o (const grid_key_dx< dim > &v1) const
 Get the of the selected element as a boost::fusion::vector.
 
encapc< dim, T, layoutget_o (size_t v1)
 Get the of the selected element as a boost::fusion::vector.
 
const encapc< dim, T, layoutget_o (size_t v1) const
 Get the of the selected element as a boost::fusion::vector.
 
encapc< dim, T, layoutinsert_o (const grid_key_dx< dim > &v1)
 Get the of the selected element as a boost::fusion::vector.
 
void fill (unsigned char fl)
 Fill the memory with the selected byte.
 
void remove (Box< dim, long int > &section_to_delete)
 Remove all the points in this region.
 
void remove (size_t key)
 Remove one element valid only on 1D.
 
void copyRemoveReset ()
 Reset the queue to remove and copy section of grids.
 
bool isSkipLabellingPossible ()
 This function check if keep geometry is possible for this grid.
 
void copy_to (const grid_base_impl< dim, T, S, memory_traits_lin > &grid_src, const Box< dim, long int > &box_src, const Box< dim, long int > &box_dst)
 copy an external grid into a specific place into this grid
 
void copy_to_prp (const grid_base_impl< dim, T, S, memory_traits_lin > &grid_src, const Box< dim, size_t > &box_src, const Box< dim, size_t > &box_dst)
 copy an external grid into a specific place into this grid
 
void clear ()
 It does nothing.
 
void copy_to_op (const grid_base_impl< dim, T, S, memory_traits_lin > &gs, const Box< dim, size_t > &bx_src, const Box< dim, size_t > &bx_dst)
 copy an external grid into a specific place into this grid
 
void resize (const size_t(&sz)[dim], size_t opt=DATA_ON_HOST|DATA_ON_DEVICE, unsigned int blockSize=1)
 Resize the grid.
 
void resize_no_device (const size_t(&sz)[dim])
 Resize the space.
 
void swap_nomode (grid_base_impl< dim, T, S, memory_traits_lin > &grid)
 It swap the objects A become B and B become A using A.swap(B);.
 
void swap (grid_base_impl< dim, T, S, memory_traits_lin, linearizer > &grid)
 It swap the objects A become B and B become A using A.swap(B);.
 
void swap (grid_base_impl< dim, T, S, memory_traits_lin > &&grid)
 It move the allocated object from one grid to another.
 
__device__ __host__ void set (const grid_key_dx< dim > &key1, const grid_base_impl &g, const grid_key_dx< dim > &key2)
 set only some properties
 
void set (grid_key_dx< dim > dx, const encapc< 1, T, Memory > &obj)
 set an element of the grid
 
void set (grid_key_dx< dim > dx, const T &obj)
 set an element of the grid
 
void set (const grid_key_dx< dim > &key1, const grid_base_impl< dim, T, S, memory_traits_lin > &g, const grid_key_dx< dim > &key2)
 Set an element of the grid from another element of another grid.
 
void set (const size_t key1, const grid_base_impl< dim, T, S, memory_traits_lin > &g, const size_t key2)
 Set an element of the grid from another element of another grid.
 
void set (const grid_key_dx< dim > &key1, const grid_base_impl< dim, T, Mem, memory_traits_lin > &g, const grid_key_dx< dim > &key2)
 Set an element of the grid from another element of another grid.
 
void set_general (const grid_key_dx< dim > &key1, const grid_base_impl< dim, T, Mem, layout_base2 > &g, const grid_key_dx< dim > &key2)
 Set an element of the grid from another element of another grid.
 
grid_key_dx_iterator_sub< dim > getSubIterator (const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop) const
 Return a sub-grid iterator.
 
grid_key_dx_iterator_sub< dim > getSubIterator (size_t m)
 Return a sub-grid iterator.
 
grid_key_dx_iterator< dim > getIterator () const
 Return a grid iterator.
 
grid_key_dx_iterator_sub< dim > getIterator (const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, bool to_init=false) const
 Return a grid iterator over all points included between start and stop point.
 
void deviceToHost ()
 Synchronize the memory buffer in the device with the memory in the host.
 
void deviceToHost (size_t start, size_t stop)
 Synchronize the memory buffer in the device with the memory in the host.
 
void hostToDeviceNUMA (size_t start, size_t stop)
 Synchronize the memory buffer in the device with the memory in the host (respecting the NUMA domains)
 
void hostToDeviceNUMA ()
 Synchronize the memory buffer in the device with the memory in the host (respecting the NUMA domains)
 
void hostToDevice (size_t start, size_t stop)
 Synchronize the memory buffer in the device with the memory in the host.
 
void hostToDevice ()
 Copy the memory from host to device.
 
grid_gpu_ker< dim, T_, memory_traits_lin, linearizer_type > toKernel ()
 Convert the grid into a data-structure compatible for computing into GPU.
 
const grid_gpu_ker< dim, T_, memory_traits_lin, linearizer_type > toKernel () const
 Convert the grid into a data-structure compatible for computing into GPU.
 
grid_key_dx_iterator< dim, stencil_offset_compute< dim, Np > > getIteratorStencil (const grid_key_dx< dim >(&stencil_pnt)[Np]) const
 Return a grid iterator.
 
layoutget_internal_data_ ()
 return the internal data_
 
const layoutget_internal_data_ () const
 return the internal data_
 
void removeAddUnpackReset ()
 In this case it does nothing.
 
void removeAddUnpackFinalize (const context_type &ctx, int opt)
 In this case it does nothing.
 
void removeCopyToFinalize (const context_type &ctx, int opt)
 In this case it does nothing.
 
void resetFlush ()
 It does nothing.
 

Static Public Member Functions

template<typename pointers_type , typename headers_type , typename result_type , unsigned int ... prp>
static void unpack_headers (pointers_type &pointers, headers_type &headers, result_type &result, int n_slot)
 Stub does not do anything.
 
static bool noPointers ()
 This structure has pointers.
 
template<typename stencil = no_stencil>
static grid_key_dx_iterator_sub< dim, stencil > type_of_subiterator ()
 This is a meta-function return which type of sub iterator a grid produce.
 
static constexpr bool isCompressed ()
 Return if in this representation data are stored is a compressed way.
 
static grid_key_dx_iterator< dim > type_of_iterator ()
 This is a meta-function return which type of iterator a grid produce.
 
- Static Public Member Functions inherited from grid_base_impl< dim, T, S, memory_traits_lin, linearizer >
static bool is_unpack_header_supported ()
 Indicate that unpacking the header is supported.
 

Private Types

typedef apply_transform< memory_traits_lin, T >::type T_
 

Private Attributes

background
 

Additional Inherited Members

- Static Public Attributes inherited from grid_base_impl< dim, T, S, memory_traits_lin, linearizer >
static constexpr unsigned int dims
 expose the dimansionality as a static const
 
- Protected Attributes inherited from grid_base_impl< dim, T, S, memory_traits_lin, linearizer >
layout data_
 Memory layout specification + memory chunk pointer.
 
linearizer g1
 This is a structure that store all information related to the grid and how indexes are linearized.
 

Member Typedef Documentation

◆ base_key

template<unsigned int dim, typename T , typename S , typename linearizer >
typedef grid_key_dx<dim> grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::base_key

type that identify one point in the grid

Definition at line 131 of file map_grid.hpp.

◆ container

template<unsigned int dim, typename T , typename S , typename linearizer >
typedef grid_base_impl<dim,T,S,memory_traits_lin>::container grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::container

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

Definition at line 125 of file map_grid.hpp.

◆ grow_policy

template<unsigned int dim, typename T , typename S , typename linearizer >
typedef void grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::grow_policy

grid_base has no grow policy

Definition at line 128 of file map_grid.hpp.

◆ layout

template<unsigned int dim, typename T , typename S , typename linearizer >
typedef memory_traits_lin<T>::type grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::layout

type of layout of the structure

Definition at line 121 of file map_grid.hpp.

◆ linearizer_type

template<unsigned int dim, typename T , typename S , typename linearizer >
typedef grid_base_impl<dim,T,S,memory_traits_lin>::linearizer_type grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::linearizer_type

linearizer type Z-morton Hilbert curve , normal striding

Definition at line 137 of file map_grid.hpp.

◆ sub_grid_iterator_type

template<unsigned int dim, typename T , typename S , typename linearizer >
typedef grid_key_dx_iterator_sub<dim> grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::sub_grid_iterator_type

sub-grid iterator type

Definition at line 134 of file map_grid.hpp.

◆ T_

template<unsigned int dim, typename T , typename S , typename linearizer >
typedef apply_transform<memory_traits_lin,T>::type grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::T_
private

Definition at line 114 of file map_grid.hpp.

Constructor & Destructor Documentation

◆ grid_base() [1/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::grid_base ( )
inline

Default constructor.

Definition at line 140 of file map_grid.hpp.

◆ grid_base() [2/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::grid_base ( const grid_base< dim, T, S, typename memory_traits_lin< T >::type > &  g)
inline

create a grid from another grid

Template Parameters
Smemory type for allocation
Parameters
gthe grid to copy
memmemory object (only used for template deduction)

Definition at line 152 of file map_grid.hpp.

◆ grid_base() [3/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::grid_base ( const size_t &  sz)
inline

create a grid of size sz on each direction

Parameters
szsize if the grid on each directions

Definition at line 162 of file map_grid.hpp.

◆ grid_base() [4/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::grid_base ( const size_t(&)  sz[dim])
inline

Constructor allocate memory.

Parameters
szsize of the grid in each dimension

Definition at line 172 of file map_grid.hpp.

Member Function Documentation

◆ convert_key()

template<unsigned int dim, typename T , typename S , typename linearizer >
void grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::convert_key ( grid_key_dx< dim > &  key_out,
const grid_key_dx< dim > &  key_in 
) const
inline

In this case it just copy the key_in in key_out.

Parameters
key_outoutput key
key_ininput key

Definition at line 300 of file map_grid.hpp.

◆ getBackgroundValue()

template<unsigned int dim, typename T , typename S , typename linearizer >
T & grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::getBackgroundValue ( )
inline

Get the background value.

For dense grid this function is useless

Returns
background value

Definition at line 313 of file map_grid.hpp.

◆ getBackgroundValueAggr()

template<unsigned int dim, typename T , typename S , typename linearizer >
T & grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::getBackgroundValueAggr ( )
inline

Get the background value.

For dense grid this function is useless

Returns
background value

Definition at line 325 of file map_grid.hpp.

◆ getDeviceBuffer()

template<unsigned int dim, typename T , typename S , typename linearizer >
template<unsigned int id>
void * grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::getDeviceBuffer ( )
inline

It return the properties arrays.

In case of Cuda memory it return the device pointers to pass to the kernels

This variant does not copy the host memory to the device memory

Definition at line 258 of file map_grid.hpp.

◆ isCompressed()

template<unsigned int dim, typename T , typename S , typename linearizer >
static constexpr bool grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::isCompressed ( )
inlinestaticconstexpr

Return if in this representation data are stored is a compressed way.

Returns
false this is a normal grid no compression

Definition at line 279 of file map_grid.hpp.

◆ noPointers()

template<unsigned int dim, typename T , typename S , typename linearizer >
static bool grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::noPointers ( )
inlinestatic

This structure has pointers.

Returns
false

Definition at line 246 of file map_grid.hpp.

◆ operator=() [1/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
__host__ grid_base< dim, T, S > & grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::operator= ( const grid_base< dim, T, S > &  g)
inline

It copy a grid.

Parameters
ggrid to copy

Definition at line 218 of file map_grid.hpp.

◆ operator=() [2/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
grid_base< dim, T, S, typename memory_traits_lin< T >::type > & grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::operator= ( const grid_base_impl< dim, T, S, memory_traits_lin > &  base)
inline

assign operator

Returns
itself

Definition at line 347 of file map_grid.hpp.

◆ operator=() [3/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
grid_base< dim, T, S, typename memory_traits_lin< T >::type > & grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::operator= ( grid_base< dim, T, S, typename memory_traits_lin< T >::type > &&  g)
inline

It copy a grid.

Parameters
ggrid to copy

Definition at line 232 of file map_grid.hpp.

◆ operator=() [4/4]

template<unsigned int dim, typename T , typename S , typename linearizer >
grid_base< dim, T, S, typename memory_traits_lin< T >::type > & grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::operator= ( grid_base_impl< dim, T, S, memory_traits_lin > &&  base)
inline

assign operator

Returns
itself

Definition at line 359 of file map_grid.hpp.

◆ setBackgroundValue()

template<unsigned int dim, typename T , typename S , typename linearizer >
template<unsigned int p>
void grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::setBackgroundValue ( const typename boost::mpl::at< typename T::type, boost::mpl::int_< p > >::type &  val)
inline

Set the background value.

Template Parameters
pproperty to set

Definition at line 336 of file map_grid.hpp.

◆ type_of_iterator()

template<unsigned int dim, typename T , typename S , typename linearizer >
static grid_key_dx_iterator< dim > grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::type_of_iterator ( )
inlinestatic

This is a meta-function return which type of iterator a grid produce.

Returns
the type of the sub-grid iterator

Definition at line 289 of file map_grid.hpp.

◆ type_of_subiterator()

template<unsigned int dim, typename T , typename S , typename linearizer >
template<typename stencil = no_stencil>
static grid_key_dx_iterator_sub< dim, stencil > grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::type_of_subiterator ( )
inlinestatic

This is a meta-function return which type of sub iterator a grid produce.

Returns
the type of the sub-grid iterator

Definition at line 269 of file map_grid.hpp.

◆ unpack_headers()

template<unsigned int dim, typename T , typename S , typename linearizer >
template<typename pointers_type , typename headers_type , typename result_type , unsigned int ... prp>
static void grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::unpack_headers ( pointers_type &  pointers,
headers_type &  headers,
result_type &  result,
int  n_slot 
)
inlinestatic

Stub does not do anything.

Definition at line 184 of file map_grid.hpp.

◆ unpack_with_headers()

template<unsigned int dim, typename T , typename S , typename linearizer >
template<unsigned int ... prp, typename S2 , typename header_type , typename ite_type , typename context_type >
void grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::unpack_with_headers ( ExtPreAlloc< S2 > &  mem,
ite_type &  sub_it,
header_type &  headers,
int  ih,
Unpack_stat ps,
context_type &  context,
rem_copy_opt  opt = rem_copy_opt::NONE_OPT 
)
inline

Definition at line 188 of file map_grid.hpp.

Field Documentation

◆ background

template<unsigned int dim, typename T , typename S , typename linearizer >
T grid_base< dim, T, S, typename memory_traits_lin< T >::type, linearizer >::background
private

Definition at line 116 of file map_grid.hpp.


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