27#ifndef EXCLUDED_PARTICLE
38 #define EXCLUDED_PARTICLE(index) imove[index] >= 3
41#if defined(LOCAL_MEM_SIZE) && defined(NO_LOCAL_MEM)
42 #error NO_LOCAL_MEM has been set.
76__kernel
void entry(
const __global
int* imove,
77 const __global
vec* r,
78 const __global
float* rho,
79 const __global
float* m,
80 __global
float* shepard,
84 const usize i = get_global_id(0);
85 const usize it = get_local_id(0);
94 #ifndef LOCAL_MEM_SIZE
95 #define _SHEPARD_ shepard[i]
97 #define _SHEPARD_ shepard_l[it]
98 __local
float shepard_l[LOCAL_MEM_SIZE];
102 const usize c_i = icell[i];
109 const vec_xyz r_ij = r[j].XYZ - r_i;
110 const float q = length(r_ij) / H;
122 #ifdef LOCAL_MEM_SIZE
#define BEGIN_NEIGHS(CELL, NPARTS, NCELLS, ICELL, IHOC)
Loop over the neighbours to compute the interactions.
Definition 2D.h:174
#define vec_xyz
Vectors with the minimum number of components.
Definition 2D.h:86
#define END_NEIGHS()
End of the loop over the neighs to compute the interactions.
Definition 2D.h:189
float kernelW(float q)
The kernel value .
Definition CubicSpline2D.hcl:44
Generic/automatic kernel header file.
#define vec
Definition LinkList.hcl.in:57
#define EXCLUDED_PARTICLE(index)
Excluded particles from the Shepard renormalization factor computation.
Definition Shepard.cl:38
__kernel void entry(const __global int *imove, const __global vec *r, const __global float *rho, const __global float *m, __global float *shepard, usize N, LINKLIST_LOCAL_PARAMS)
Shepard factor computation.
Definition Shepard.cl:76
Generic types definition file.
#define LINKLIST_LOCAL_PARAMS
Macro to easily add the parameters to run BEGIN_NEIGHS macro, interacting with the local set of parti...
Definition types.h:106