OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
vector_dist_operators_extensions.hpp
1 /*
2  * vector_dist_operators_extensions.hpp
3  *
4  * Created on: Jul 18, 2016
5  * Author: i-bird
6  */
7 
8 #ifndef OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_EXTENSIONS_HPP_
9 #define OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_EXTENSIONS_HPP_
10 
11 
18 template <unsigned int dim, typename T>
20 {
21  vector_dist_expression<(unsigned int)16384,Point<dim,T>> exp_v(v);
22 
23  return exp_v;
24 }
25 
26 
32 template<typename point>
33 class vector_dist_expression<16384,point>
34 {
36  point p;
37 
38 public:
39 
40  typedef void vtype;
41 
43  typedef boost::mpl::bool_<false> is_sort;
44 
46  typedef void NN_type;
47 
50  :p(p)
51  {}
52 
58  inline void init() const
59  {}
60 
68  __device__ __host__ inline point value(const vect_dist_key_dx & k) const
69  {
70  return p;
71  }
72 };
73 
74 
75 #endif /* OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_EXTENSIONS_HPP_ */
__device__ __host__ point value(const vect_dist_key_dx &k) const
Evaluate the expression.
vector_dist_expression(point p)
vector expression from a constant point
This class implement the point shape in an N-dimensional space.
Definition: Point.hpp:27
vector vtype
The type of the internal vector.
Grid key for a distributed grid.
boost::mpl::bool_< false > is_sort
result for is sort
Main class that encapsulate a vector properties operand to be used for expressions construction.
KeyT const ValueT ValueT OffsetIteratorT OffsetIteratorT int
[in] The number of segments that comprise the sorting data
void init() const
This function must be called before value.