5 #ifndef _CNE_VECT_X86_H_
6 #define _CNE_VECT_X86_H_
17 #if (defined(__ICC) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
19 #include <smmintrin.h>
22 #include <immintrin.h>
27 #include <x86intrin.h>
35 #define CNE_VECT_DEFAULT_SIMD_BITWIDTH CNE_VECT_SIMD_256
37 typedef __m128i xmm_t;
48 #define XMM_MASK (XMM_SIZE - 1)
50 typedef union cne_xmm {
52 uint8_t u8[XMM_SIZE /
sizeof(uint8_t)];
53 uint16_t u16[XMM_SIZE /
sizeof(uint16_t)];
54 uint32_t u32[XMM_SIZE /
sizeof(uint32_t)];
55 uint64_t u64[XMM_SIZE /
sizeof(uint64_t)];
56 double pd[XMM_SIZE /
sizeof(double)];
63 __cne_vec_xmm_size_check(
void)
70 typedef __m256i ymm_t;
73 #define YMM_MASK (YMM_SIZE - 1)
75 typedef union cne_ymm {
77 xmm_t x[YMM_SIZE /
sizeof(xmm_t)];
78 uint8_t u8[YMM_SIZE /
sizeof(uint8_t)];
79 uint16_t u16[YMM_SIZE /
sizeof(uint16_t)];
80 uint32_t u32[YMM_SIZE /
sizeof(uint32_t)];
81 uint64_t u64[YMM_SIZE /
sizeof(uint64_t)];
82 double pd[YMM_SIZE /
sizeof(double)];
89 __cne_vec_ymm_size_check(
void)
98 #define CNE_X86_ZMM_SIZE 64
99 #define CNE_X86_ZMM_MASK (CNE_X86_ZMM_SIZE - 1)
101 typedef union __cne_x86_zmm {
103 ymm_t y[CNE_X86_ZMM_SIZE /
sizeof(ymm_t)];
104 xmm_t x[CNE_X86_ZMM_SIZE /
sizeof(xmm_t)];
105 uint8_t u8[CNE_X86_ZMM_SIZE /
sizeof(uint8_t)];
106 uint16_t u16[CNE_X86_ZMM_SIZE /
sizeof(uint16_t)];
107 uint32_t u32[CNE_X86_ZMM_SIZE /
sizeof(uint32_t)];
108 uint64_t u64[CNE_X86_ZMM_SIZE /
sizeof(uint64_t)];
109 double pd[CNE_X86_ZMM_SIZE /
sizeof(double)];
116 __cne_vec_cne_x86_zmm_size_check(
void)
#define CNE_BUILD_BUG_ON(condition)