src/simd/neon/sph.c file

NEON neighbor loops for the SPH density sum and pressure gradient.

Same kernels as the scalar path: cubic spline and Wendland C2, support (r < 2h), normalized. Neighbors are processed 4-wide (f32) or 2-wide (f64). No hardware gather; indices are loaded scalar then packed into a vector. The scalar functions stay the fallback.

Functions

static auto hsum(const vm_vec v) -> vm_float_t
static auto any_le(const vm_vec v, const vm_float_t s) -> int
static auto gather_f(const vm_float_t* base, const int* idx) -> vm_vec
static auto sigma_of(const int dim, const int kernel) -> vm_float_t
static auto shape_f(const vm_vec q, const int kernel) -> vm_vec
static auto shape_df(const vm_vec q, const int kernel) -> vm_vec
auto vm_sph_density_neon(const vm_float_t* x, const vm_float_t* y, const vm_float_t* z, const vm_float_t* m, const int i, const int* neighbors, const int nn, const vm_float_t h, const int dim, const int kernel) -> vm_float_t
auto vm_sph_pressure_grad_neon(vm_float_t* gx, vm_float_t* gy, vm_float_t* gz, const vm_float_t* x, const vm_float_t* y, const vm_float_t* z, const vm_float_t* m, const vm_float_t* rho, const vm_float_t* p, const int i, const int* neighbors, const int nn, const vm_float_t h, const int dim, const int kernel) -> bool

Defines

#define VM_LANES
#define vm_set1
#define vm_setzero
#define vm_add
#define vm_sub
#define vm_mul
#define vm_div
#define vm_sqrt
#define vm_max
#define vm_and
#define vm_cmp_lt(a, b)
#define vm_cmp_gt(a, b)
#define vm_mask_and(a, b)
#define vm_blend(a, b, m)
#define vm_load