26#ifndef SIMD_INTRINS_INTEL_H_
27#define SIMD_INTRINS_INTEL_H_
31#ifdef SIMDVEC_INTEL_ENABLE
37#pragma GCC diagnostic push
38#if defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
39#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
40#pragma GCC diagnostic ignored "-Wuninitialized"
43#pragma GCC diagnostic pop
53#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && \
54 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 50500 && \
55 !defined(__OPTIMIZE__) && defined(__AVX512BW__)
60extern __inline __m512i
61 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
62 _mm512_packs_epi32(__m512i __A, __m512i __B)
64 return (__m512i) __builtin_ia32_packssdw512_mask(
65 (__v16si) __A, (__v16si) __B, (__v32hi) _mm512_setzero_hi(),
69extern __inline __m512i
70 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
71 _mm512_packus_epi32(__m512i __A, __m512i __B)
73 return (__m512i) __builtin_ia32_packusdw512_mask(
74 (__v16si) __A, (__v16si) __B, (__v32hi) _mm512_setzero_hi(),
94#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && \
95 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 70000 && \
99 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
100 _mm512_abs_ps(__m512 __A)
102 return (__m512) _mm512_and_epi32((__m512i) __A,
103 _mm512_set1_epi32(0x7fffffff));
106extern __inline __m512
107 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
108 _mm512_mask_abs_ps(__m512 __W, __mmask16 __U, __m512 __A)
110 return (__m512) _mm512_mask_and_epi32((__m512i) __W, __U, (__m512i) __A,
111 _mm512_set1_epi32(0x7fffffff));
114extern __inline __m512d
115 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
116 _mm512_abs_pd(__m512d __A)
118 return (__m512d) _mm512_and_epi64((__m512i) __A,
119 _mm512_set1_epi64(0x7fffffffffffffffLL));
122extern __inline __m512d
123 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
124 _mm512_mask_abs_pd(__m512d __W, __mmask8 __U, __m512d __A)
126 return (__m512d) _mm512_mask_and_epi64(
127 (__m512i) __W, __U, (__m512i) __A, _mm512_set1_epi64(0x7fffffffffffffffLL));
142#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && \
143 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 80000 && \
146extern __inline __m256
147 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
148 _mm256_set_m128(__m128 __H, __m128 __L)
150 return _mm256_insertf128_ps(_mm256_castps128_ps256(__L), __H, 1);
153extern __inline __m256d
154 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
155 _mm256_set_m128d(__m128d __H, __m128d __L)
157 return _mm256_insertf128_pd(_mm256_castpd128_pd256(__L), __H, 1);
160extern __inline __m256i
161 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
162 _mm256_set_m128i(__m128i __H, __m128i __L)
164 return _mm256_insertf128_si256(_mm256_castsi128_si256(__L), __H, 1);
167extern __inline __m256
168 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
169 _mm256_setr_m128(__m128 __L, __m128 __H)
171 return _mm256_set_m128(__H, __L);
174extern __inline __m256d
175 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
176 _mm256_setr_m128d(__m128d __L, __m128d __H)
178 return _mm256_set_m128d(__H, __L);
181extern __inline __m256i
182 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
183 _mm256_setr_m128i(__m128i __L, __m128i __H)
185 return _mm256_set_m128i(__H, __L);
200#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && \
201 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 90000 && \
204extern __inline __m512i
205 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
206 _mm512_set_epi8(
char __q63,
char __q62,
char __q61,
char __q60,
char __q59,
207 char __q58,
char __q57,
char __q56,
char __q55,
char __q54,
208 char __q53,
char __q52,
char __q51,
char __q50,
char __q49,
209 char __q48,
char __q47,
char __q46,
char __q45,
char __q44,
210 char __q43,
char __q42,
char __q41,
char __q40,
char __q39,
211 char __q38,
char __q37,
char __q36,
char __q35,
char __q34,
212 char __q33,
char __q32,
char __q31,
char __q30,
char __q29,
213 char __q28,
char __q27,
char __q26,
char __q25,
char __q24,
214 char __q23,
char __q22,
char __q21,
char __q20,
char __q19,
215 char __q18,
char __q17,
char __q16,
char __q15,
char __q14,
216 char __q13,
char __q12,
char __q11,
char __q10,
char __q09,
217 char __q08,
char __q07,
char __q06,
char __q05,
char __q04,
218 char __q03,
char __q02,
char __q01,
char __q00)
220 return __extension__(__m512i)(__v64qi) {
221 __q00, __q01, __q02, __q03, __q04, __q05, __q06, __q07, __q08, __q09, __q10,
222 __q11, __q12, __q13, __q14, __q15, __q16, __q17, __q18, __q19, __q20, __q21,
223 __q22, __q23, __q24, __q25, __q26, __q27, __q28, __q29, __q30, __q31, __q32,
224 __q33, __q34, __q35, __q36, __q37, __q38, __q39, __q40, __q41, __q42, __q43,
225 __q44, __q45, __q46, __q47, __q48, __q49, __q50, __q51, __q52, __q53, __q54,
226 __q55, __q56, __q57, __q58, __q59, __q60, __q61, __q62, __q63};
229extern __inline __m512i
230 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
231 _mm512_set_epi16(
short __q31,
short __q30,
short __q29,
short __q28,
232 short __q27,
short __q26,
short __q25,
short __q24,
233 short __q23,
short __q22,
short __q21,
short __q20,
234 short __q19,
short __q18,
short __q17,
short __q16,
235 short __q15,
short __q14,
short __q13,
short __q12,
236 short __q11,
short __q10,
short __q09,
short __q08,
237 short __q07,
short __q06,
short __q05,
short __q04,
238 short __q03,
short __q02,
short __q01,
short __q00)
240 return __extension__(__m512i)(__v32hi) {
241 __q00, __q01, __q02, __q03, __q04, __q05, __q06, __q07, __q08, __q09, __q10,
242 __q11, __q12, __q13, __q14, __q15, __q16, __q17, __q18, __q19, __q20, __q21,
243 __q22, __q23, __q24, __q25, __q26, __q27, __q28, __q29, __q30, __q31};