src/simd/avx2/eos.c file

AVX2 batched ideal and stiffened gas.

8-wide f32 / 4-wide f64. A chunk with a bad density or negative (c^2) falls back to the scalar call from that item, so a failure leaves the same items unwritten as the scalar batch.

Functions

static auto load_s(const vm_float_t* base, const int stride, const int k) -> vm_vec
static auto any_mask(const vm_vec m) -> int
static auto ideal_tail(vm_float_t* p, vm_float_t* c, const vm_ideal_gas* eos, const vm_float_t* rho, const int rho_stride, const vm_float_t* e, const int e_stride, const int from, const int n) -> bool
static auto stiff_tail(vm_float_t* p, vm_float_t* c, const vm_stiff_gas* eos, const vm_float_t* rho, const int rho_stride, const vm_float_t* e, const int e_stride, const int from, const int n) -> bool
auto vm_eos_ideal_n_avx2(vm_float_t* p, vm_float_t* c, const vm_ideal_gas* eos, const vm_float_t* rho, const int rho_stride, const vm_float_t* e, const int e_stride, const int n) -> bool
auto vm_eos_stiffened_n_avx2(vm_float_t* p, vm_float_t* c, const vm_stiff_gas* eos, const vm_float_t* rho, const int rho_stride, const vm_float_t* e, const int e_stride, const int n) -> bool

Defines

#define VM_LANES
#define vm_set1
#define vm_mul
#define vm_sub
#define vm_add
#define vm_div
#define vm_sqrt
#define vm_cmp_le(a, b)
#define vm_cmp_lt(a, b)
#define vm_store