src/simd/avx2/soa3.c file

AVX2 SoA 3-vector geometry kernels.

f32 is 8-wide, f64 is 4-wide. Vectorized across vectors, not components. Unaligned loads and stores. Separate multiplies and adds in the scalar order, never fused, so every lane matches the scalar reference bit for bit. Cross loads all six components before it stores, so an exact view alias is safe.

Functions

void vm_soa3_dot_avx2(vm_float_t* res, const vm_csoa3 a, const vm_csoa3 b, const int n)
void vm_soa3_cross_avx2(const vm_soa3 res, const vm_csoa3 a, const vm_csoa3 b, const int n)
void vm_soa3_length_squared_avx2(vm_float_t* res, const vm_csoa3 a, const int n)
void vm_soa3_distance_squared_avx2(vm_float_t* res, const vm_csoa3 a, const vm_csoa3 b, const int n)

Defines

#define LANES
#define vload(p)
#define vstore(p, v)
#define vadd(a, b)
#define vsub(a, b)
#define vmul(a, b)