From 1dae09795bd2fd2f764588dc71c0abffa3a941c8 Mon Sep 17 00:00:00 2001 From: x Date: Fri, 9 Jun 2023 14:35:22 +0200 Subject: [PATCH] TurboPFor: Config/Platform --- lib/include_/conf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/include_/conf.h b/lib/include_/conf.h index 397e93e..b281b0e 100755 --- a/lib/include_/conf.h +++ b/lib/include_/conf.h @@ -171,7 +171,7 @@ static ALWAYS_INLINE unsigned short ctou16(const void *cp) { unsigned short static ALWAYS_INLINE unsigned ctou32(const void *cp) { unsigned x; memcpy(&x, cp, sizeof(x)); return x; } static ALWAYS_INLINE unsigned long long ctou64(const void *cp) { unsigned long long x; memcpy(&x, cp, sizeof(x)); return x; } static ALWAYS_INLINE size_t ctousz(const void *cp) { size_t x; memcpy(&x, cp, sizeof(x)); return x; } -#ifdef FLT16_MAX +#ifdef FLT16_BUILTIN static ALWAYS_INLINE _Float16 ctof16(const void *cp) { _Float16 x; memcpy(&x, cp, sizeof(x)); return x; } #endif static ALWAYS_INLINE float ctof32(const void *cp) { float x; memcpy(&x, cp, sizeof(x)); return x; } @@ -181,7 +181,7 @@ static ALWAYS_INLINE void stou16( void *cp, unsigned short static ALWAYS_INLINE void stou32( void *cp, unsigned x) { memcpy(cp, &x, sizeof(x)); } static ALWAYS_INLINE void stou64( void *cp, unsigned long long x) { memcpy(cp, &x, sizeof(x)); } static ALWAYS_INLINE void stousz( void *cp, size_t x) { memcpy(cp, &x, sizeof(x)); } -#ifdef FLT16_MAX +#ifdef FLT16_BUILTIN static ALWAYS_INLINE void stof16( void *cp, _Float16 x) { memcpy(cp, &x, sizeof(x)); } #endif static ALWAYS_INLINE void stof32( void *cp, float x) { memcpy(cp, &x, sizeof(x)); } @@ -233,7 +233,7 @@ struct _PACKED doubleu { double d; }; struct _PACKED shortu { unsigned short s; }; struct _PACKED unsignedu { unsigned u; }; struct _PACKED longu { uint64_t l; }; -#ifdef FLT16_MAX +#ifdef FLT16_BUILTIN struct _PACKED float16u { _Float16 g; }; #endif struct _PACKED floatu { float f; };