clang 20.0.0git
avx10_2_512minmaxintrin.h
Go to the documentation of this file.
1/*===---- avx10_2_512minmaxintrin.h - AVX10_2_512MINMAX intrinsics ---------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __IMMINTRIN_H
10#error \
11 "Never use <avx10_2_512minmaxintrin.h> directly; include <immintrin.h> instead."
12#endif // __IMMINTRIN_H
13
14#ifndef __AVX10_2_512MINMAXINTRIN_H
15#define __AVX10_2_512MINMAXINTRIN_H
16
17#define _mm512_minmaxne_pbh(A, B, C) \
18 ((__m512bh)__builtin_ia32_vminmaxnepbf16512( \
19 (__v32bf)(__m512bh)(A), (__v32bf)(__m512bh)(A), (int)(C)))
20
21#define _mm512_mask_minmaxne_pbh(W, U, A, B, C) \
22 ((__m512bh)__builtin_ia32_selectpbf_512( \
23 (__mmask32)(U), \
24 (__v32bf)_mm512_minmaxne_pbh((__v32bf)(__m512bh)(A), \
25 (__v32bf)(__m512bh)(B), (int)(C)), \
26 (__v32bf)(__m512bh)(W)))
27
28#define _mm512_maskz_minmaxne_pbh(U, A, B, C) \
29 ((__m512bh)__builtin_ia32_selectpbf_512( \
30 (__mmask32)(U), \
31 (__v32bf)_mm512_minmaxne_pbh((__v32bf)(__m512bh)(A), \
32 (__v32bf)(__m512bh)(B), (int)(C)), \
33 (__v32bf) __builtin_bit_cast(__m512bh, _mm512_setzero_ps())))
34
35#define _mm512_minmax_pd(A, B, C) \
36 ((__m512d)__builtin_ia32_vminmaxpd512_round_mask( \
37 (__v8df)(__m512d)(A), (__v8df)(__m512d)(B), (int)(C), \
38 (__v8df)_mm512_undefined_pd(), (__mmask8)-1, \
39 _MM_FROUND_CUR_DIRECTION))
40
41#define _mm512_mask_minmax_pd(W, U, A, B, C) \
42 ((__m512d)__builtin_ia32_vminmaxpd512_round_mask( \
43 (__v8df)(__m512d)(A), (__v8df)(__m512d)(B), (int)(C), \
44 (__v8df)(__m512d)(W), (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
45
46#define _mm512_maskz_minmax_pd(U, A, B, C) \
47 ((__m512d)__builtin_ia32_vminmaxpd512_round_mask( \
48 (__v8df)(__m512d)(A), (__v8df)(__m512d)(B), (int)(C), \
49 (__v8df)_mm512_setzero_pd(), (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
50
51#define _mm512_minmax_round_pd(A, B, C, R) \
52 ((__m512d)__builtin_ia32_vminmaxpd512_round_mask( \
53 (__v8df)(__m512d)(A), (__v8df)(__m512d)(B), (int)(C), \
54 (__v8df)_mm512_undefined_pd(), (__mmask8)-1, (int)(R)))
55
56#define _mm512_mask_minmax_round_pd(W, U, A, B, C, R) \
57 ((__m512d)__builtin_ia32_vminmaxpd512_round_mask( \
58 (__v8df)(__m512d)(A), (__v8df)(__m512d)(B), (int)(C), \
59 (__v8df)(__m512d)(W), (__mmask8)(U), (int)(R)))
60
61#define _mm512_maskz_minmax_round_pd(U, A, B, C, R) \
62 ((__m512d)__builtin_ia32_vminmaxpd512_round_mask( \
63 (__v8df)(__m512d)(A), (__v8df)(__m512d)(B), (int)(C), \
64 (__v8df)_mm512_setzero_pd(), (__mmask8)(U), (int)(R)))
65
66#define _mm512_minmax_ph(A, B, C) \
67 ((__m512h)__builtin_ia32_vminmaxph512_round_mask( \
68 (__v32hf)(__m512h)(A), (__v32hf)(__m512h)(B), (int)(C), \
69 (__v32hf)_mm512_undefined_ph(), (__mmask32)-1, \
70 _MM_FROUND_CUR_DIRECTION))
71
72#define _mm512_mask_minmax_ph(W, U, A, B, C) \
73 ((__m512h)__builtin_ia32_vminmaxph512_round_mask( \
74 (__v32hf)(__m512h)(A), (__v32hf)(__m512h)(B), (int)(C), \
75 (__v32hf)(__m512h)(W), (__mmask32)(U), _MM_FROUND_CUR_DIRECTION))
76
77#define _mm512_maskz_minmax_ph(U, A, B, C) \
78 ((__m512h)__builtin_ia32_vminmaxph512_round_mask( \
79 (__v32hf)(__m512h)(A), (__v32hf)(__m512h)(B), (int)(C), \
80 (__v32hf)_mm512_setzero_ph(), (__mmask32)(U), _MM_FROUND_CUR_DIRECTION))
81
82#define _mm512_minmax_round_ph(A, B, C, R) \
83 ((__m512h)__builtin_ia32_vminmaxph512_round_mask( \
84 (__v32hf)(__m512h)(A), (__v32hf)(__m512h)(B), (int)(C), \
85 (__v32hf)_mm512_undefined_ph(), (__mmask32)-1, (int)(R)))
86
87#define _mm512_mask_minmax_round_ph(W, U, A, B, C, R) \
88 ((__m512h)__builtin_ia32_vminmaxph512_round_mask( \
89 (__v32hf)(__m512h)(A), (__v32hf)(__m512h)(B), (int)(C), \
90 (__v32hf)(__m512h)(W), (__mmask32)(U), (int)(R)))
91
92#define _mm512_maskz_minmax_round_ph(U, A, B, C, R) \
93 ((__m512h)__builtin_ia32_vminmaxph512_round_mask( \
94 (__v32hf)(__m512h)(A), (__v32hf)(__m512h)(B), (int)(C), \
95 (__v32hf)_mm512_setzero_ph(), (__mmask32)(U), (int)(R)))
96
97#define _mm512_minmax_ps(A, B, C) \
98 ((__m512)__builtin_ia32_vminmaxps512_round_mask( \
99 (__v16sf)(__m512)(A), (__v16sf)(__m512)(B), (int)(C), \
100 (__v16sf)_mm512_undefined_ps(), (__mmask16)-1, \
101 _MM_FROUND_CUR_DIRECTION))
102
103#define _mm512_mask_minmax_ps(W, U, A, B, C) \
104 ((__m512)__builtin_ia32_vminmaxps512_round_mask( \
105 (__v16sf)(__m512)(A), (__v16sf)(__m512)(B), (int)(C), (__v16sf)(W), \
106 (__mmask16)(U), _MM_FROUND_CUR_DIRECTION))
107
108#define _mm512_maskz_minmax_ps(U, A, B, C) \
109 ((__m512)__builtin_ia32_vminmaxps512_round_mask( \
110 (__v16sf)(__m512)(A), (__v16sf)(__m512)(B), (int)(C), \
111 (__v16sf)_mm512_setzero_ps(), (__mmask16)(U), _MM_FROUND_CUR_DIRECTION))
112
113#define _mm512_minmax_round_ps(A, B, C, R) \
114 ((__m512)__builtin_ia32_vminmaxps512_round_mask( \
115 (__v16sf)(__m512)(A), (__v16sf)(__m512)(B), (int)(C), \
116 (__v16sf)_mm512_undefined_ps(), (__mmask16)-1, (int)(R)))
117
118#define _mm512_mask_minmax_round_ps(W, U, A, B, C, R) \
119 ((__m512)__builtin_ia32_vminmaxps512_round_mask( \
120 (__v16sf)(__m512)(A), (__v16sf)(__m512)(B), (int)(C), (__v16sf)(W), \
121 (__mmask16)(U), (int)(R)))
122
123#define _mm512_maskz_minmax_round_ps(U, A, B, C, R) \
124 ((__m512)__builtin_ia32_vminmaxps512_round_mask( \
125 (__v16sf)(__m512)(A), (__v16sf)(__m512)(B), (int)(C), \
126 (__v16sf)_mm512_setzero_ps(), (__mmask16)(U), (int)(R)))
127#endif // __AVX10_2_512MINMAXINTRIN_H