OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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 108 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
 
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
 

Member Typedef Documentation

◆ obj_type

template<unsigned int dim, typename S , typename Memory >
typedef S::value_type copy_cpu_encap< dim, S, Memory >::obj_type

type of the object we have to set

Definition at line 117 of file grid_common.hpp.

◆ ov_seq

template<unsigned int dim, typename S , typename Memory >
typedef S::value_type::type copy_cpu_encap< dim, S, Memory >::ov_seq

type of the object boost::sequence

Definition at line 120 of file grid_common.hpp.

Constructor & Destructor Documentation

◆ copy_cpu_encap()

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 134 of file grid_common.hpp.

Member Function Documentation

◆ operator()()

template<unsigned int dim, typename S , typename Memory >
template<typename T >
void copy_cpu_encap< dim, S, Memory >::operator() ( T &  t) const
inline

It call the copy function for each property.

Definition at line 152 of file grid_common.hpp.

Field Documentation

◆ grid_dst

template<unsigned int dim, typename S , typename Memory >
S& copy_cpu_encap< dim, S, Memory >::grid_dst

grid where we have to store the data

Definition at line 114 of file grid_common.hpp.

◆ key

template<unsigned int dim, typename S , typename Memory >
grid_key_dx<dim>& copy_cpu_encap< dim, S, Memory >::key

size to allocate

Definition at line 111 of file grid_common.hpp.

◆ obj

template<unsigned int dim, typename S , typename Memory >
const encapc<1,obj_type,Memory>& copy_cpu_encap< dim, S, Memory >::obj

object we have to store

Definition at line 123 of file grid_common.hpp.


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