src/simd/avx2/array.c file

AVX2 elementwise array kernels.

f32 is 8-wide, f64 is 4-wide. Unaligned loads and stores. Exact alias is safe because each element is written in order. vm_axpy is a multiply then an add, not a fused multiply-add.

Typedefs

using vec_t = __m256d

Functions

void vm_array_add_avx2(vm_float_t* res, const vm_float_t* a, const vm_float_t* b, const int n)
void vm_array_sub_avx2(vm_float_t* res, const vm_float_t* a, const vm_float_t* b, const int n)
void vm_array_mul_avx2(vm_float_t* res, const vm_float_t* a, const vm_float_t* b, const int n)
void vm_array_div_avx2(vm_float_t* res, const vm_float_t* a, const vm_float_t* b, const int n)
void vm_array_fma_avx2(vm_float_t* res, const vm_float_t* a, const vm_float_t* b, const vm_float_t* c, const int n)
void vm_axpy_avx2(vm_float_t* y, const vm_float_t alpha, const vm_float_t* x, const int n)
void vm_rsqrt_array_avx2(vm_float_t* res, const vm_float_t* x, 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)
#define vsqrt(a)
#define vdiv(a, b)
#define vfma(a, b, c)
#define vset1(x)