12# pragma clang diagnostic push
13# pragma clang diagnostic ignored "-Wmismatched-tags"
15#define HALF_ROUND_STYLE 1
16#define HALF_ROUND_TIES_TO_EVEN 1
19# pragma clang diagnostic pop
25#define THORIN_1_8_16_32_64(m) m(1) m(8) m(16) m(32) m(64)
26#define THORIN_8_16_32_64(m) m(8) m(16) m(32) m(64)
27#define THORIN_16_32_64(m) m(16) m(32) m(64)
33 using s ## i = int ## i ##_t; \
34 using u ## i = uint ## i ##_t;
38using half_float::half;
53template<
int>
struct w2u_ {
using type = void; };
54template<
int>
struct w2s_ {
using type = void; };
55template<
int>
struct w2f_ {
using type = void; };
56template<>
struct w2u_<1> {
using type = bool; };
57template<>
struct w2s_<1> {
using type = bool; };
60 template<> struct w2u_<i> { using type = u ## i; }; \
61 template<> struct w2s_<i> { using type = s ## i; };
66 template<> struct w2f_<i> { using type = f ## i; };
73template<
int w>
using w2u =
typename detail::w2u_<w>::type;
74template<
int w>
using w2s =
typename detail::w2s_<w>::type;
75template<
int w>
using w2f =
typename detail::w2f_<w>::type;
81 constexpr s ## i operator"" _s ## i(unsigned long long int s) { return s ## i(s); } \
82 constexpr u ## i operator"" _u ## i(unsigned long long int u) { return u ## i(u); }
87constexpr size_t operator""_s(
unsigned long long int i) {
return size_t(i); }
88constexpr nat_t operator""_n(
unsigned long long int i) {
return nat_t(i); }
89inline f16 operator""_f16(
long double d) {
return f16(
float(d)); }
90constexpr f32 operator""_f32(
long double d) {
return f32(d); }
91constexpr f64 operator""_f64(
long double d) {
return f64(d); }
96inline half
rem(half a, half b) {
return fmod(a, b); }
97inline float rem(
float a,
float b) {
return std::fmod(a, b); }
98inline double rem(
double a,
double b) {
return std::fmod(a, b); }
99inline long double rem(
long double a,
long double b) {
return std::fmod(a, b); }
typename detail::w2s_< w >::type w2s
typename detail::w2u_< w >::type w2u
typename detail::w2f_< w >::type w2f
#define THORIN_8_16_32_64(m)
#define THORIN_16_32_64(m)