kyber512r3_align_avx2.h 389 B

12345678910111213141516171819
  1. #pragma once
  2. #include <stdint.h>
  3. #if defined(S2N_KYBER512R3_AVX2_BMI2)
  4. #include <immintrin.h>
  5. #define ALIGNED_UINT8(N) \
  6. union { \
  7. uint8_t coeffs[N]; \
  8. __m256i vec[(N+31)/32]; \
  9. }
  10. #define ALIGNED_INT16(N) \
  11. union { \
  12. int16_t coeffs[N]; \
  13. __m256i vec[(N+15)/16]; \
  14. }
  15. #endif