1515#define __F16CINTRIN_H
1616
1717/* 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-
2318#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
2625#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 )))
2932#endif
3033
3134/* NOTE: Intel documents the 128-bit versions of these as being in emmintrin.h,
4346// / \param __a
4447// / A 16-bit half-precision float value.
4548// / \returns The converted 32-bit float value.
46- static __inline float __DEFAULT_FN_ATTRS128_CONSTEXPR
49+ static __inline float __DEFAULT_FN_ATTRS128
4750_cvtsh_ss (unsigned short __a)
4851{
4952 return (float )__builtin_bit_cast (__fp16, __a);
@@ -112,7 +115,7 @@ _cvtsh_ss(unsigned short __a)
112115// / A 128-bit vector containing 16-bit half-precision float values. The lower
113116// / 64 bits are used in the conversion.
114117// / \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
116119_mm_cvtph_ps (__m128i __a)
117120{
118121 typedef __fp16 __v4fp16 __attribute__ ((__vector_size__ (8 )));
@@ -159,7 +162,7 @@ _mm_cvtph_ps(__m128i __a)
159162// / converted to 32-bit single-precision float values.
160163// / \returns A vector of [8 x float] containing the converted 32-bit
161164// / single-precision float values.
162- static __inline __m256 __DEFAULT_FN_ATTRS256_CONSTEXPR
165+ static __inline __m256 __DEFAULT_FN_ATTRS256
163166_mm256_cvtph_ps (__m128i __a)
164167{
165168 typedef __fp16 __v8fp16 __attribute__ ((__vector_size__ (16 ), __aligned__ (16 )));
@@ -169,7 +172,5 @@ _mm256_cvtph_ps(__m128i __a)
169172
170173#undef __DEFAULT_FN_ATTRS128
171174#undef __DEFAULT_FN_ATTRS256
172- #undef __DEFAULT_FN_ATTRS128_CONSTEXPR
173- #undef __DEFAULT_FN_ATTRS256_CONSTEXPR
174175
175176#endif /* __F16CINTRIN_H */
0 commit comments