8 #ifndef OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_APPLY_KERNEL_HPP_ 9 #define OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_APPLY_KERNEL_HPP_ 13 #define DEFINE_INTERACTION_3D(name) struct name \ 16 Point<3,double> value(const Point<3,double> & xp, const Point<3,double> xq)\ 19 #define END_INTERACTION }\ 28 template<
typename ObjType,
typename Sfinae =
void>
31 template<
typename ObjType>
36 template<typename exp, bool is_exp = is_expression<exp>::value>
40 typedef typename exp::return_type
rtype;
44 template<
typename exp>
56 template<
typename rtype>
60 __device__ __host__
static rtype
create()
67 template<
unsigned int dim,
typename T>
80 constexpr
int NN_index_sort = 1;
81 constexpr
int NN_index_unsort = 0;
83 template<
unsigned int impl>
86 template<
typename NN_type>
87 __device__ __host__
static auto get(NN_type & NN) -> decltype(NN.get())
96 template<
typename NN_type>
97 __device__ __host__
static auto get(NN_type & NN) -> decltype(NN.get_sort())
107 template<unsigned int impl, typename T, typename vector, typename exp,typename NN_type, typename Kernel, typename rtype, bool is_exp=is_expression<T>::value>
121 inline __host__ __device__
static typename std::remove_reference<rtype>::type
apply(
const vector & vd, NN_type & cl,
const exp & v_exp,
const vect_dist_key_dx & key, Kernel & lker)
130 rtype prp_p = v_exp.
value(key);
133 auto NN = cl.template getNNIterator<NO_CHECK>(cl.getCell(p));
146 rtype prp_q = v_exp.value(nnp_k);
151 pse += lker.
value(p,q,prp_p,prp_q);
167 template<
unsigned int impl,
typename vector,
typename exp,
typename NN_type,
typename Kernel,
typename rtype>
180 __device__ __host__
inline static typename std::remove_reference<rtype>::type
apply(
const vector & vd, NN_type & cl,
const vect_dist_key_dx & key, Kernel & lker)
189 auto NN = cl.template getNNIterator<NO_CHECK>(cl.getCell(p));
201 pse += lker.
value(p,q);
218 template<unsigned int impl, typename T, typename vector, typename exp,typename NN_type, typename Kernel, typename rtype, bool is_exp=is_expression<T>::value>
232 __device__ __host__
inline static typename std::remove_reference<rtype>::type
apply(
const vector & vd, NN_type & cl,
const exp & v_exp,
const vect_dist_key_dx & key, Kernel & lker)
238 rtype prp_p = v_exp.value(key);
244 auto NN = cl.template getNNIterator<NO_CHECK>(cl.getCell(p));
257 rtype prp_q = v_exp.value(nnp_k);
259 pse += lker.value(key.
getKey(),nnp,prp_p,prp_q,vd);
270 template<
typename T,
bool mm>
290 template<typename T, bool is_reference = std::is_reference<T>::value>
293 typedef const T type;
299 typedef typename std::remove_reference<T>::type
const & type;
308 template <
typename exp1,
typename vector_type>
312 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<0>>::type
NN;
314 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<1>>::type
Kernel;
316 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<2>>::type
vector_orig;
319 typedef typename std::remove_reference<NN>::type
NN_nr;
321 typedef typename std::remove_reference<Kernel>::type
Kernel_nr;
393 :o1(o1),cl(cl),ker(ker),vd(vd)
406 decltype(o1.value(key)),
411 rtype>::apply(vd,cl.obj,o1,key,ker.obj);
421 template <
typename exp1,
typename vector_type>
425 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<0>>::type
NN;
427 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<1>>::type
Kernel;
429 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<2>>::type
vector_orig;
432 typedef typename std::remove_reference<NN>::type
NN_nr;
434 typedef typename std::remove_reference<Kernel>::type
Kernel_nr;
506 :o1(o1),cl(cl),ker(ker),vd(vd)
519 decltype(o1.value(key)),
524 rtype>::apply(vd,cl.obj,o1,key,ker.obj);
534 template <
typename exp1,
typename vector_type>
538 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<0>>::type
NN;
540 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<1>>::type
Kernel;
542 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<2>>::type
vector_orig;
545 typedef typename std::remove_reference<NN>::type
NN_nr;
547 typedef typename std::remove_reference<Kernel>::type
Kernel_nr;
615 :cl(cl),ker(ker),vd(vd)
632 rtype>::apply(vd,cl.obj,key,ker.obj);
642 template <
typename exp1,
typename vector_type>
646 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<0>>::type
NN;
648 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<1>>::type
Kernel;
650 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<2>>::type
vector_orig;
653 typedef typename std::remove_reference<NN>::type
NN_nr;
655 typedef typename std::remove_reference<Kernel>::type
Kernel_nr;
723 :cl(cl),ker(ker),vd(vd)
740 rtype>::apply(vd,cl.obj,key,ker.obj);
750 template <
typename exp1,
typename vector_type>
754 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<0>>::type
NN;
756 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<1>>::type
Kernel;
759 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<2>>::type
vector_orig;
762 typedef typename std::remove_reference<NN>::type
NN_nr;
764 typedef typename std::remove_reference<Kernel>::type
Kernel_nr;
836 :o1(o1),cl(cl),ker(ker),vd(vd)
849 decltype(o1.value(key)),
854 rtype>::apply(vd,cl.obj,o1,key,ker.obj);
864 template <
typename exp1,
typename vector_type>
868 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<0>>::type
NN;
870 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<1>>::type
Kernel;
873 typedef typename boost::mpl::at<vector_type,boost::mpl::int_<2>>::type
vector_orig;
876 typedef typename std::remove_reference<NN>::type
NN_nr;
878 typedef typename std::remove_reference<Kernel>::type
Kernel_nr;
950 :o1(o1),cl(cl),ker(ker),vd(vd)
963 decltype(o1.value(key)),
968 rtype>::apply(vd,cl.obj,o1,key,ker.obj);
975 typedef cl_type& ctype;
977 static ctype & get(cl_type & cl)
983 template<
typename cl_type>
986 typedef decltype(std::declval<cl_type>().toKernel()) ctype;
988 static ctype get(cl_type & cl)
990 return cl.toKernel();
994 template<
typename cl_type>
997 typedef cl_type ctype;
999 static ctype & get(cl_type & cl)
1008 typedef kl_type& ktype;
1011 template<
typename kl_type,
typename cl_type>
1014 typedef kl_type ktype;
1017 template<
typename kl_type,
typename cl_type>
1020 typedef kl_type ktype;
1023 template<
bool is_sorted,
bool uwk,
typename T>
1028 static T & get(T & v)
1034 template<
typename T>
1037 typedef decltype(std::declval<T>().toKernel()) type;
1039 static type get(T & v)
1041 return v.toKernel();
1045 template<
typename T>
1048 typedef decltype(std::declval<T>().toKernel_sorted()) type;
1050 static type get(T & v)
1052 return v.toKernel_sorted();
1059 typedef vl_type& vtype;
1061 static vtype & get(vl_type & v)
1067 template<
typename vl_type,
typename cl_type>
1070 typedef decltype(std::declval<vl_type>().toKernel()) vtype;
1072 static vtype & get(vl_type & v)
1074 return v.toKernel();
1078 template<
typename vl_type,
typename cl_type>
1081 typedef decltype(std::declval<vl_type>().toKernel()) vtype;
1083 static vtype & get(vl_type & v)
1085 return v.toKernel_sorted();
1089 template<
bool is_sorted,
typename vl_type,
typename cl_type>
1094 static vtype get(vl_type & v)
1112 template<
typename exp1,
typename exp2,
unsigned int op1,
typename NN,
typename Kernel,
typename vector_type>
1114 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1115 typename kl_selector_impl<Kernel,NN>::ktype,
1121 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1122 typename kl_selector_impl<Kernel,NN>::ktype,
1124 VECT_APPLYKER_IN> exp_sum(va,
1144 template<
typename exp1,
typename exp2,
unsigned int op1,
typename NN,
typename Kernel,
typename vector_type>
1146 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1147 typename kl_selector_impl<Kernel,NN>::ktype,
1149 VECT_APPLYKER_IN_SORT>
1153 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1154 typename kl_selector_impl<Kernel,NN>::ktype,
1156 VECT_APPLYKER_IN_SORT> exp_sum(va,
1172 template<
typename exp1,
typename exp2,
unsigned int op1,
typename NN,
typename Kernel,
typename vector_type>
1174 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1175 typename kl_selector_impl<Kernel,NN>::ktype,
1177 VECT_APPLYKER_IN_GEN>
1181 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1182 typename kl_selector_impl<Kernel,NN>::ktype,
1184 VECT_APPLYKER_IN_GEN> exp_sum(va,
1200 template<
typename exp1,
typename exp2,
unsigned int op1,
typename NN,
typename Kernel,
typename vector_type>
1202 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1203 typename kl_selector_impl<Kernel,NN>::ktype,
1205 VECT_APPLYKER_IN_GEN_SORT>
1209 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1210 typename kl_selector_impl<Kernel,NN>::ktype,
1212 VECT_APPLYKER_IN_GEN_SORT> exp_sum(va,
1230 template<
unsigned int prp,
typename NN,
typename Kernel,
typename vector_type,
typename vector_type_ker>
1232 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1233 typename kl_selector_impl<Kernel,NN>::ktype,
1239 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1240 typename kl_selector_impl<Kernel,NN>::ktype,
1242 VECT_APPLYKER_IN> exp_sum(va,
1258 template<
unsigned int prp,
typename NN,
typename Kernel,
typename vector_type,
typename vector_type_ker>
1260 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1261 typename kl_selector_impl<Kernel,NN>::ktype,
1263 VECT_APPLYKER_IN_SORT>
1267 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1268 typename kl_selector_impl<Kernel,NN>::ktype,
1270 VECT_APPLYKER_IN_SORT> exp_sum(va,
1286 template<
unsigned int prp,
typename NN,
typename Kernel,
typename vector_type,
typename vector_type_ker>
1288 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1289 typename kl_selector_impl<Kernel,NN>::ktype,
1291 VECT_APPLYKER_IN_GEN>
1295 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1296 typename kl_selector_impl<Kernel,NN>::ktype,
1298 VECT_APPLYKER_IN_GEN> exp_sum(va,
1314 template<
unsigned int prp,
typename NN,
typename Kernel,
typename vector_type,
typename vector_type_ker>
1316 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1317 typename kl_selector_impl<Kernel,NN>::ktype,
1319 VECT_APPLYKER_IN_GEN_SORT>
1323 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1324 typename kl_selector_impl<Kernel,NN>::ktype,
1326 VECT_APPLYKER_IN_GEN_SORT> exp_sum(va,
1342 template<
typename NN,
typename Kernel,
typename vector_type>
1344 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1345 typename kl_selector_impl<Kernel,NN>::ktype,
1347 VECT_APPLYKER_IN_SIM>
1348 applyKernel_in_sim(
vector_type & vd, NN & cl, Kernel & ker)
1351 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1352 typename kl_selector_impl<Kernel,NN>::ktype,
1369 template<
typename NN,
typename Kernel,
typename vector_type>
1371 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1372 typename kl_selector_impl<Kernel,NN>::ktype,
1374 VECT_APPLYKER_IN_SIM_SORT>
1375 applyKernel_in_sim_sort(
vector_type & vd, NN & cl, Kernel & ker)
1378 boost::mpl::vector<typename cl_selector_impl<NN>::ctype,
1379 typename kl_selector_impl<Kernel,NN>::ktype,
std::remove_reference< NN >::type NN_nr
Return the type of the Cell-list.
mutable_or_not< NN, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > cl
Cell-list.
vector_orig_nr vtype
vector type on which this expression work
__device__ static __host__ std::remove_reference< rtype >::type apply(const vector &vd, NN_type &cl, const vect_dist_key_dx &key, Kernel &lker)
Apply the kernel expression to a particle.
mutable_or_not< NN, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > cl
Cell-list.
boost::mpl::at< vector_type, boost::mpl::int_< 2 > >::type vector_orig
Get the type of the vector containing the set of particles.
const vtype & getVector() const
get the vector
add_const_reference< vector_orig >::type vd
The vector that contain the particles.
boost::mpl::at< vector_type, boost::mpl::int_< 2 > >::type vector_orig
Return the vector containing the position of the particles.
__device__ __host__ std::remove_reference< rtype >::type value(const vect_dist_key_dx &key) const
Evaluate the expression.
const vtype & getVector() const
get the vector
std::remove_reference< vector_orig >::type vector_orig_nr
Return the vector containing the position of the particles.
const vtype & getVector() const
get the vector
std::remove_reference< Kernel >::type Kernel_nr
Return the type of the kernel.
boost::mpl::at< vector_type, boost::mpl::int_< 1 > >::type Kernel
Get the type of the kernel.
__device__ static __host__ Point< dim, T > create()
return a point with all the coordinates set to zero
boost::mpl::at< vector_type, boost::mpl::int_< 2 > >::type vector_orig
Return the vector containing the position of the particles.
void init() const
This function must be called before value.
std::remove_reference< Kernel >::type Kernel_nr
Return the type of the kernel.
const vector_orig vd
vector with the particle positions
std::remove_reference< Kernel >::type Kernel_nr
Return the type of the kernel.
NN_nr * getNN() const
get the NN object
NN_nr * getNN() const
get the NN object
mutable_or_not< NN, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > cl
Cell-list.
const vtype & getVector() const
get the vector
void init() const
This function must be called before value.
exp rtype
indicate the return type of the expression exp
__device__ __host__ std::remove_reference< rtype >::type value(const vect_dist_key_dx &key) const
Evaluate the expression.
vector_dist_expression_op(const exp1 &o1, NN &cl, Kernel &ker, const vector_orig &vd)
Constructor.
__device__ __host__ std::remove_reference< rtype >::type value(const vect_dist_key_dx &key) const
Evaluate the expression.
apply_kernel_rtype< decltype(o1.value(vect_dist_key_dx()))>::rtype rtype
Get the return type of applying the kernel to a particle.
NN_nr * getNN() const
get the NN object
has_vector_kernel< vector_orig_nr >::type is_ker
indicate if this expression operate on kernel expression
std::remove_reference< vector_orig >::type vector_orig_nr
Return the vector containing the position of the particles.
__device__ __host__ void setKey(size_t key)
set the key
Meta-function to return a compatible zero-element.
apply_kernel_rtype< decltype(o1.value(vect_dist_key_dx()))>::rtype rtype
Return type of the expression.
const vtype & getVector() const
get the vector
NN_nr NN_type
type of NN structure
This class implement the point shape in an N-dimensional space.
NN_nr * getNN() const
get the NN object
Grid key for a distributed grid.
apply_kernel_rtype< decltype(o1.value(vect_dist_key_dx()))>::rtype rtype
Get the return type of applying the kernel to a particle.
boost::mpl::bool_< false > is_sort
indicate that is apply_kernel is not a sorted version
NN_nr NN_type
type of NN structure
T & value(size_t i)
Return the reference to the value at coordinate i.
boost::mpl::at< vector_type, boost::mpl::int_< 0 > >::type NN
Get the type of the Cell-list.
vector_dist_expression_op(NN &cl, Kernel &ker, const vector_orig &vd)
Constructor.
std::remove_reference< vector_orig >::type vector_orig_nr
Return the vector containing the position of the particles.
boost::mpl::at< vector_type, boost::mpl::int_< 2 > >::type vector_orig
Get the type of the vector containing the set of particles.
boost::mpl::at< vector_type, boost::mpl::int_< 1 > >::type Kernel
Return the type of the kernel.
vector_dist_expression_op(const exp1 &o1, NN_nr &cl, Kernel &ker, const vector_orig_nr &vd)
Constructor.
mutable_or_not< NN, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > cl
Cell-list.
__host__ static __device__ std::remove_reference< rtype >::type apply(const vector &vd, NN_type &cl, const exp &v_exp, const vect_dist_key_dx &key, Kernel &lker)
Apply the kernel expression to a particle.
boost::mpl::at< vector_type, boost::mpl::int_< 1 > >::type Kernel
Get the type of the kernel.
std::remove_reference< NN >::type NN_nr
Return the type of the Cell-list.
std::remove_reference< Kernel >::type Kernel_nr
Return the type of the kernel.
vector_dist_expression_op(const exp1 &o1, NN &cl, Kernel &ker, const vector_orig &vd)
Constructor.
NN_nr NN_type
type of NN structure
boost::mpl::bool_< true > is_sort
indicate that is apply_kernel is not a sorted version
mutable_or_not< Kernel, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > ker
kernel
mutable_or_not< Kernel, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > ker
kernel
boost::mpl::bool_< false > is_sort
indicate that is apply_kernel is not a sorted version
boost::mpl::at< vector_type, boost::mpl::int_< 1 > >::type Kernel
Get the type of the kernel.
boost::mpl::at< vector_type, boost::mpl::int_< 2 > >::type vector_orig
Get the type that contain the particle positions.
void init() const
This function must be called before value.
const vtype & getVector() const
get the vector
has_vector_kernel< vector_orig_nr >::type is_ker
indicate if this expression operate on kernel expression
mutable_or_not< Kernel, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > ker
kernel
std::remove_reference< NN >::type NN_nr
Return the type of the Cell-list.
const vector_orig vd
Vector containing the particles.
boost::mpl::bool_< false > is_sort
indicate that is apply_kernel is not a sorted version
has_vector_kernel< vector_orig_nr >::type is_ker
indicate if this expression operate on kernel expression
Unknown operation specialization.
mutable_or_not< Kernel, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > ker
kernel
has_vector_kernel< vector_orig_nr >::type is_ker
indicate if this expression operate on kernel expression
mutable_or_not< Kernel, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > ker
kernel
vector_orig_nr vtype
vector type on which this expression work
vector_dist_expression_op(NN &cl, Kernel &ker, const vector_orig &vd)
Constructor.
__device__ __host__ std::remove_reference< rtype >::type value(const vect_dist_key_dx &key) const
Evaluate the expression.
boost::mpl::at< vector_type, boost::mpl::int_< 0 > >::type NN
Get the type of the Cell-list.
std::remove_reference< vector_orig >::type vector_orig_nr
Return the vector containing the position of the particles.
void init() const
This function must be called before value.
Main class that encapsulate a vector properties operand to be used for expressions construction.
std::remove_reference< Kernel >::type Kernel_nr
Return the type of the kernel.
vector_orig_nr vtype
vector type on which this expression work
boost::mpl::at< vector_type, boost::mpl::int_< 0 > >::type NN
Return the type of the Cell-list.
boost::mpl::at< vector_type, boost::mpl::int_< 2 > >::type vector_orig
Get the type that contain the particle positions.
__device__ static __host__ rtype create()
return 0
std::remove_reference< NN >::type NN_nr
Return the type of the Cell-list.
Apply the kernel to particle differently that is a number or is an expression.
__device__ __host__ std::remove_reference< rtype >::type value(const vect_dist_key_dx &key) const
Evaluate the expression.
add_const_reference< vector_orig >::type vd
The vector that contain the particles.
vector_orig_nr vtype
vector type on which this expression work
boost::mpl::bool_< true > is_sort
indicate that is apply_kernel is not a sorted version
__device__ __host__ void zero()
Set to zero the point coordinate.
NN_nr * getNN() const
get the NN object
std::remove_reference< vector_orig >::type vector_orig_nr
Return the vector containing the position of the particles.
exp::return_type rtype
indicate the return type of the expression exp
mutable_or_not< NN, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > cl
Cell-list.
__device__ __host__ std::remove_reference< rtype >::type value(const vect_dist_key_dx &key) const
Evaluate the expression.
std::remove_reference< vector_orig >::type vector_orig_nr
Return the vector containing the position of the particles.
__device__ __host__ size_t getKey() const
Get the key.
apply_kernel_rtype< decltype(o1.value(vect_dist_key_dx()))>::rtype rtype
Return type of the expression.
apply_kernel_rtype< decltype(std::declval< Kernel_nr >).value(Point< vector_orig_nr::dims, typename vector_orig_nr::stype >0.0), Point< vector_orig_nr::dims, typename vector_orig_nr::stype >0.0)))>::rtype rtype
Get the return type of the expression.
void init() const
This function must be called before value.
NN_nr * getNN() const
get the NN object
has_vector_kernel< vector_orig_nr >::type is_ker
indicate if this expression operate on kernel expression
std::remove_reference< NN >::type NN_nr
Return the type of the Cell-list.
has_vector_kernel< vector_orig_nr >::type is_ker
indicate if this expression operate on kernel expression
It give the return type of the expression if applicable.
vector_dist_expression_op(const exp1 &o1, NN_nr &cl, Kernel &ker, const vector_orig_nr &vd)
Constructor.
const vector_orig vd
vector with the particle positions
NN_nr NN_type
type of NN structure
NN_nr NN_type
type of NN structure
Apply the kernel to particle differently that is a number or is an expression.
apply_kernel_rtype< decltype(std::declval< Kernel_nr >).value(Point< vector_orig_nr::dims, typename vector_orig_nr::stype >0.0), Point< vector_orig_nr::dims, typename vector_orig_nr::stype >0.0)))>::rtype rtype
Get the return type of the expression.
vector_orig_nr vtype
vector type on which this expression work
std::remove_reference< Kernel >::type Kernel_nr
Return the type of the kernel.
boost::mpl::at< vector_type, boost::mpl::int_< 0 > >::type NN
Get the type of the Cell-list.
boost::mpl::at< vector_type, boost::mpl::int_< 1 > >::type Kernel
Return the type of the kernel.
__device__ static __host__ std::remove_reference< rtype >::type apply(const vector &vd, NN_type &cl, const exp &v_exp, const vect_dist_key_dx &key, Kernel &lker)
Apply the kernel expression to a particle.
Check this is a gpu or cpu type cell-list.
boost::mpl::bool_< true > is_sort
indicate that is apply_kernel is not a sorted version
void init() const
This function must be called before value.
Apply the kernel to particle differently that is a number or is an expression.
mutable_or_not< Kernel, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > ker
kernel
mutable_or_not< NN, is_gpu_celllist< NN >::type::value||is_gpu_ker_celllist< NN >::type::value > cl
Cell-list.
const vector_orig vd
Vector containing the particles.
boost::mpl::at< vector_type, boost::mpl::int_< 1 > >::type Kernel
Get the type of the kernel.
boost::mpl::at< vector_type, boost::mpl::int_< 0 > >::type NN
Get the type of the Cell-list.
NN_nr NN_type
type of NN structure
boost::mpl::at< vector_type, boost::mpl::int_< 0 > >::type NN
Return the type of the Cell-list.
vector_orig_nr vtype
vector type on which this expression work
std::remove_reference< NN >::type NN_nr
Return the type of the Cell-list.
is_expression check if a type is simple a type or is just an encapsulation of an expression