OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
copy_cpu_encap< dim, S, Memory > Struct Template Reference

this class is a functor for "for_each" algorithm More...

Detailed Description

template<unsigned int dim, typename S, typename Memory>
struct copy_cpu_encap< dim, S, Memory >

this class is a functor for "for_each" algorithm

This class is a functor for "for_each" algorithm. For each element of the boost::vector the operator() is called. Is mainly used to copy one object into one target grid element in a generic way for a generic object T with variable number of property

Template Parameters
dimDimensionality
Stype of grid
Memorytype of memory needed for encap

Definition at line 28 of file grid_common.hpp.

#include <grid_common.hpp>

Public Types

typedef S::value_type obj_type
 type of the object we have to set
 
typedef S::value_type::type ov_seq
 type of the object boost::sequence
 

Public Member Functions

 copy_cpu_encap (grid_key_dx< dim > &key, S &grid_dst, const encapc< 1, obj_type, Memory > &obj)
 constructor More...
 
template<typename T >
void operator() (T &t) const
 It call the copy function for each property.
 

Data Fields

grid_key_dx< dim > & key
 size to allocate
 
S & grid_dst
 grid where we have to store the data
 
const encapc< 1, obj_type,
Memory > & 
obj
 object we have to store
 

Constructor & Destructor Documentation

template<unsigned int dim, typename S, typename Memory>
copy_cpu_encap< dim, S, Memory >::copy_cpu_encap ( grid_key_dx< dim > &  key,
S &  grid_dst,
const encapc< 1, obj_type, Memory > &  obj 
)
inline

constructor

It define the copy parameters.

Parameters
keywhich element we are modifying
grid_dstgrid we are updating
objobject we have to set in grid_dst (encapsulated)

Definition at line 54 of file grid_common.hpp.


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