1 /*===------------- avx512bwintrin.h - AVX512BW intrinsics ------------------===
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 *===-----------------------------------------------------------------------===
25 #ifndef __AVX512BWINTRIN_H
26 #define __AVX512BWINTRIN_H
28 typedef unsigned int __mmask32
;
29 typedef unsigned long long __mmask64
;
30 typedef char __v64qi
__attribute__ ((vector_size (64)));
31 typedef short __v32hi
__attribute__ ((__vector_size__ (64)));
36 static __inline__ __mmask64
__attribute__((__always_inline__
, __nodebug__
))
37 _mm512_cmpeq_epi8_mask(__m512i __a
, __m512i __b
) {
38 return (__mmask64
)__builtin_ia32_pcmpeqb512_mask((__v64qi
)__a
, (__v64qi
)__b
,
42 static __inline__ __mmask64
__attribute__((__always_inline__
, __nodebug__
))
43 _mm512_mask_cmpeq_epi8_mask(__mmask64 __u
, __m512i __a
, __m512i __b
) {
44 return (__mmask64
)__builtin_ia32_pcmpeqb512_mask((__v64qi
)__a
, (__v64qi
)__b
,
48 static __inline__ __mmask32
__attribute__((__always_inline__
, __nodebug__
))
49 _mm512_cmpeq_epi16_mask(__m512i __a
, __m512i __b
) {
50 return (__mmask32
)__builtin_ia32_pcmpeqw512_mask((__v32hi
)__a
, (__v32hi
)__b
,
54 static __inline__ __mmask32
__attribute__((__always_inline__
, __nodebug__
))
55 _mm512_mask_cmpeq_epi16_mask(__mmask32 __u
, __m512i __a
, __m512i __b
) {
56 return (__mmask32
)__builtin_ia32_pcmpeqw512_mask((__v32hi
)__a
, (__v32hi
)__b
,