15
15
#define __F16CINTRIN_H
16
16
17
17
/* Define the default attributes for the functions in this file. */
18
- #define __DEFAULT_FN_ATTRS128 \
19
- __attribute__ ((__always_inline__, __nodebug__, __target__(" f16c" ), __min_vector_width__(128 )))
20
- #define __DEFAULT_FN_ATTRS256 \
21
- __attribute__ ((__always_inline__, __nodebug__, __target__(" f16c" ), __min_vector_width__(256 )))
22
-
23
18
#if defined(__cplusplus) && (__cplusplus >= 201103L)
24
- #define __DEFAULT_FN_ATTRS128_CONSTEXPR __DEFAULT_FN_ATTRS128 constexpr
25
- #define __DEFAULT_FN_ATTRS256_CONSTEXPR __DEFAULT_FN_ATTRS256 constexpr
19
+ #define __DEFAULT_FN_ATTRS128 \
20
+ __attribute__ ((__always_inline__, __nodebug__, __target__(" f16c" ), \
21
+ __min_vector_width__(128 ))) constexpr
22
+ #define __DEFAULT_FN_ATTRS256 \
23
+ __attribute__ ((__always_inline__, __nodebug__, __target__(" f16c" ), \
24
+ __min_vector_width__(256 ))) constexpr
26
25
#else
27
- #define __DEFAULT_FN_ATTRS128_CONSTEXPR __DEFAULT_FN_ATTRS128
28
- #define __DEFAULT_FN_ATTRS256_CONSTEXPR __DEFAULT_FN_ATTRS256
26
+ #define __DEFAULT_FN_ATTRS128 \
27
+ __attribute__ ((__always_inline__, __nodebug__, __target__(" f16c" ), \
28
+ __min_vector_width__(128 )))
29
+ #define __DEFAULT_FN_ATTRS256 \
30
+ __attribute__ ((__always_inline__, __nodebug__, __target__(" f16c" ), \
31
+ __min_vector_width__(256 )))
29
32
#endif
30
33
31
34
/* NOTE: Intel documents the 128-bit versions of these as being in emmintrin.h,
43
46
// / \param __a
44
47
// / A 16-bit half-precision float value.
45
48
// / \returns The converted 32-bit float value.
46
- static __inline float __DEFAULT_FN_ATTRS128_CONSTEXPR
49
+ static __inline float __DEFAULT_FN_ATTRS128
47
50
_cvtsh_ss (unsigned short __a)
48
51
{
49
52
return (float )__builtin_bit_cast (__fp16, __a);
@@ -112,7 +115,7 @@ _cvtsh_ss(unsigned short __a)
112
115
// / A 128-bit vector containing 16-bit half-precision float values. The lower
113
116
// / 64 bits are used in the conversion.
114
117
// / \returns A 128-bit vector of [4 x float] containing converted float values.
115
- static __inline __m128 __DEFAULT_FN_ATTRS128_CONSTEXPR
118
+ static __inline __m128 __DEFAULT_FN_ATTRS128
116
119
_mm_cvtph_ps (__m128i __a)
117
120
{
118
121
typedef __fp16 __v4fp16 __attribute__ ((__vector_size__ (8 )));
@@ -159,7 +162,7 @@ _mm_cvtph_ps(__m128i __a)
159
162
// / converted to 32-bit single-precision float values.
160
163
// / \returns A vector of [8 x float] containing the converted 32-bit
161
164
// / single-precision float values.
162
- static __inline __m256 __DEFAULT_FN_ATTRS256_CONSTEXPR
165
+ static __inline __m256 __DEFAULT_FN_ATTRS256
163
166
_mm256_cvtph_ps (__m128i __a)
164
167
{
165
168
typedef __fp16 __v8fp16 __attribute__ ((__vector_size__ (16 ), __aligned__ (16 )));
@@ -169,7 +172,5 @@ _mm256_cvtph_ps(__m128i __a)
169
172
170
173
#undef __DEFAULT_FN_ATTRS128
171
174
#undef __DEFAULT_FN_ATTRS256
172
- #undef __DEFAULT_FN_ATTRS128_CONSTEXPR
173
- #undef __DEFAULT_FN_ATTRS256_CONSTEXPR
174
175
175
176
#endif /* __F16CINTRIN_H */
0 commit comments