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_ 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)