OpenFPM  5.2.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 void NN_type;
44 
47  :p(p)
48  {}
49 
55  inline void init() const
56  {}
57 
65  __device__ __host__ inline point value(const vect_dist_key_dx & k) const
66  {
67  return p;
68  }
69 };
70 
71 
72 #endif /* OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_EXTENSIONS_HPP_ */
This class implement the point shape in an N-dimensional space.
Definition: Point.hpp:28
Grid key for a distributed grid.
__device__ __host__ point value(const vect_dist_key_dx &k) const
Evaluate the expression.
void init() const
This function must be called before value.
vector_dist_expression(point p)
vector expression from a constant point
Main class that encapsulate a vector properties operand to be used for expressions construction.
vector vtype
The type of the internal vector.
KeyT const ValueT ValueT OffsetIteratorT OffsetIteratorT int
[in] The number of segments that comprise the sorting data