OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
CellList_cpu_ker.cuh
1 /*
2  * CellList_gpu_ker.cuh
3  *
4  * Created on: Jul 30, 2018
5  * Author: i-bird
6  */
7 
8 #ifndef CELLLIST_CPU_KER_CUH_
9 #define CELLLIST_CPU_KER_CUH_
10 
11 #include "Cuda_cell_list_util_func.hpp"
12 
13 template<unsigned int dim, typename T, typename Mem_type, typename transform>
14 class CellList_cpu_ker: Mem_type
15 {
16  typedef typename Mem_type::local_index_type cnt_type;
17 
18  typedef typename Mem_type::local_index_type ids_type;
19 
22 
25 
28 
30  transform t;
31 
32 public:
33 
34  CellList_cpu_ker(const Mem_type & mt,
38  const transform & t)
39  :Mem_type(mt),spacing_c(spacing_c),div_c(div_c),off(off),t(t)
40  {}
41 
42  inline __device__ unsigned int getCell(const Point<dim,T> & xp) const
43  {
45  }
46 
54  inline __device__ int getNelements(unsigned int cell) const
55  {
56  return Mem_type::getNelements(cell);
57  }
58 
69  inline __device__ unsigned int get(unsigned int cell, unsigned int ele)
70  {
71  return Mem_type::get(cell,ele);
72  }
73 
74 };
75 
76 
77 #endif /* CELLLIST_GPU_KER_CUH_ */
__device__ unsigned int get(unsigned int cell, unsigned int ele)
Get an element in the cell.
This class implement the point shape in an N-dimensional space.
Definition: Point.hpp:27
__device__ int getNelements(unsigned int cell) const
Return the number of elements in the cell.
openfpm::array< ids_type, dim, cnt_type > off
cell padding
openfpm::array< T, dim, cnt_type > spacing_c
Spacing.
transform t
transformation
openfpm::array< ids_type, dim, cnt_type > div_c
number of sub-divisions in each direction