#ifndef SPQLIOS_REIM4_ARITHMETIC_H #define SPQLIOS_REIM4_ARITHMETIC_H #include "../commons.h" // the reim4 structure represent 4 complex numbers, // represented as re0,re1,re2,re3,im0,im1,im2,im3 // TODO implement these basic arithmetic functions. (only ref is needed) /** @brief dest = 0 */ EXPORT void reim4_zero(double* dest); /** @brief dest = a + b */ EXPORT void reim4_add(double* dest, const double* u, const double* v); /** @brief dest = a * b */ EXPORT void reim4_mul(double* dest, const double* u, const double* v); /** @brief dest += a * b */ EXPORT void reim4_add_mul(double* dest, const double* a, const double* b); // TODO add the dot products: vec x mat1col, vec x mat2cols functions here (ref and avx) // TODO implement the convolution functions here (ref and avx) /** * @brief k-th coefficient of the convolution product a * b. * * The k-th coefficient is defined as sum_{i+j=k} a[i].b[j]. * (in this sum, i and j must remain within the bounds [0,sizea[ and [0,sizeb[) * * In practice, accounting for these bounds, the convolution function boils down to * ``` * res := 0 * if (k