From 86ec29d2e0eb64dfca173237bcdde6e66e219d09 Mon Sep 17 00:00:00 2001 From: Alexander Nicholi Date: Wed, 14 Apr 2021 01:23:56 -0400 Subject: [PATCH] remove half- and quad-precision floats --- decl/include/uni/types/complexf.h | 18 ----- decl/include/uni/types/float.h | 13 --- decl/include/uni/types/opt/complexf.h | 8 -- decl/include/uni/types/opt/float.h | 6 -- decl/include/uni/types/opt/quant.h | 30 ------- decl/include/uni/types/opt/vecf.h | 10 +++ decl/include/uni/types/opt/veci.h | 109 ++++++++++++++++++++++++++ decl/include/uni/types/quant.h | 90 --------------------- decl/include/uni/types/vecf.h | 22 ------ 9 files changed, 119 insertions(+), 187 deletions(-) diff --git a/decl/include/uni/types/complexf.h b/decl/include/uni/types/complexf.h index a380c11..e4f2119 100644 --- a/decl/include/uni/types/complexf.h +++ b/decl/include/uni/types/complexf.h @@ -15,24 +15,6 @@ #include -#if defined( __VSCODE_INTELLISENSE__ ) - -typedef __complex__ float cf16; -typedef __complex__ double cf128; - -typedef __complex__ volatile float vcf16; -typedef __complex__ volatile double vcf128; - -#else - -typedef __complex__ short cf16; -typedef __complex__ __float128 cf128; - -typedef __complex__ volatile short vcf16; -typedef __complex__ volatile __float128 vcf128; - -#endif /* defined( __VSCODE_INTELLISENSE__ ) */ - typedef __complex__ float cf32; typedef __complex__ double cf64; diff --git a/decl/include/uni/types/float.h b/decl/include/uni/types/float.h index ffc6edb..a2acf43 100644 --- a/decl/include/uni/types/float.h +++ b/decl/include/uni/types/float.h @@ -27,24 +27,11 @@ #endif /* !defined( UNI_NODEPREC ) */ #endif /* defined( UNI_DEPRECATED ) */ -typedef u16 f16; -typedef volatile u16 vf16; - typedef float f32; typedef volatile float vf32; typedef double f64; typedef volatile double vf64; typedef long double f80 UNI_DEPRECATED; -#if defined( __GNUC__ ) && !defined( __clang__ ) -typedef __float128 f128; -typedef volatile __float128 f128; -#define UNI_HAS_F128( ) 1 -#elif defined( __clang__ ) && UNI_HAS_I128( ) -typedef u128 f128; -typedef volatile u128 vf128; -#define UNI_HAS_F128( ) 1 -#else #define UNI_HAS_F128( ) 0 -#endif #endif /* INC_API__UNI_TYPES_FLOAT_H */ diff --git a/decl/include/uni/types/opt/complexf.h b/decl/include/uni/types/opt/complexf.h index 8e8be94..3478626 100644 --- a/decl/include/uni/types/opt/complexf.h +++ b/decl/include/uni/types/opt/complexf.h @@ -24,19 +24,11 @@ #define IMAG __imag__ #endif /* IMAG */ -UNI_DECL_OPT( cf16 ); UNI_DECL_OPT( cf32 ); UNI_DECL_OPT( cf64 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( cf128 ); -#endif /* UNI_HAS_F128 */ -UNI_DECL_OPT( vcf16 ); UNI_DECL_OPT( vcf32 ); UNI_DECL_OPT( vcf64 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( vcf128 ); -#endif /* UNI_HAS_F128 */ #endif /* !defined( __clang__) && !defined( __GNUC__ ) */ diff --git a/decl/include/uni/types/opt/float.h b/decl/include/uni/types/opt/float.h index 58b1144..8c07ebd 100644 --- a/decl/include/uni/types/opt/float.h +++ b/decl/include/uni/types/opt/float.h @@ -11,15 +11,9 @@ #include #include -UNI_DECL_OPT( f16 ); -UNI_DECL_OPT( vf16 ); UNI_DECL_OPT( f32 ); UNI_DECL_OPT( vf32 ); UNI_DECL_OPT( f64 ); UNI_DECL_OPT( vf64 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( f128 ); -UNI_DECL_OPT( vf128 ); -#endif /* UNI_HAS_F128( ) */ #endif /* INC_API__UNI_TYPES_OPT_FLOAT_H */ diff --git a/decl/include/uni/types/opt/quant.h b/decl/include/uni/types/opt/quant.h index 5eb74ff..692696c 100644 --- a/decl/include/uni/types/opt/quant.h +++ b/decl/include/uni/types/opt/quant.h @@ -11,59 +11,29 @@ #include #include -UNI_DECL_OPT( q16d2 ); -UNI_DECL_OPT( vq16d2 ); UNI_DECL_OPT( q32d2 ); UNI_DECL_OPT( vq32d2 ); UNI_DECL_OPT( q64d2 ); UNI_DECL_OPT( vq64d2 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( q128d2 ); -UNI_DECL_OPT( vq128d2 ); -#endif /* UNI_HAS_F128( ) */ -UNI_DECL_OPT( q16d3 ); -UNI_DECL_OPT( vq16d3 ); UNI_DECL_OPT( q32d3 ); UNI_DECL_OPT( vq32d3 ); UNI_DECL_OPT( q64d3 ); UNI_DECL_OPT( vq64d3 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( q128d3 ); -UNI_DECL_OPT( vq128d3 ); -#endif /* UNI_HAS_F128( ) */ -UNI_DECL_OPT( q16d4 ); -UNI_DECL_OPT( vq16d4 ); UNI_DECL_OPT( q32d4 ); UNI_DECL_OPT( vq32d4 ); UNI_DECL_OPT( q64d4 ); UNI_DECL_OPT( vq64d4 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( q128d4 ); -UNI_DECL_OPT( vq128d4 ); -#endif /* UNI_HAS_F128( ) */ -UNI_DECL_OPT( q16d5 ); -UNI_DECL_OPT( vq16d5 ); UNI_DECL_OPT( q32d5 ); UNI_DECL_OPT( vq32d5 ); UNI_DECL_OPT( q64d5 ); UNI_DECL_OPT( vq64d5 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( q128d5 ); -UNI_DECL_OPT( vq128d5 ); -#endif /* UNI_HAS_F128( ) */ -UNI_DECL_OPT( q16d6 ); -UNI_DECL_OPT( vq16d6 ); UNI_DECL_OPT( q32d6 ); UNI_DECL_OPT( vq32d6 ); UNI_DECL_OPT( q64d6 ); UNI_DECL_OPT( vq64d6 ); -#if UNI_HAS_F128( ) -UNI_DECL_OPT( q128d6 ); -UNI_DECL_OPT( vq128d6 ); -#endif /* UNI_HAS_F128( ) */ #endif /* INC_API__UNI_TYPES_OPT_QUANT_H */ diff --git a/decl/include/uni/types/opt/vecf.h b/decl/include/uni/types/opt/vecf.h index e529681..6652f0b 100644 --- a/decl/include/uni/types/opt/vecf.h +++ b/decl/include/uni/types/opt/vecf.h @@ -9,5 +9,15 @@ #define INC_API__UNI_TYPES_OPT_VECF_H #include +#include + +UNI_DECL_OPT( f32v2 ); +UNI_DECL_OPT( f32v4 ); +UNI_DECL_OPT( f32v8 ); +UNI_DECL_OPT( f32v16 ); + +UNI_DECL_OPT( f64v2 ); +UNI_DECL_OPT( f64v4 ); +UNI_DECL_OPT( f64v8 ); #endif /* INC_API__UNI_TYPES_OPT_VECF_H */ diff --git a/decl/include/uni/types/opt/veci.h b/decl/include/uni/types/opt/veci.h index c310c0b..bbbfe7f 100644 --- a/decl/include/uni/types/opt/veci.h +++ b/decl/include/uni/types/opt/veci.h @@ -9,5 +9,114 @@ #define INC_API__UNI_TYPES_OPT_VECI_H #include +#include + +UNI_DECL_OPT( s8v2 ); +UNI_DECL_OPT( s8v4 ); +UNI_DECL_OPT( s8v8 ); +UNI_DECL_OPT( s8v16 ); +UNI_DECL_OPT( s8v32 ); +UNI_DECL_OPT( s8v64 ); + +UNI_DECL_OPT( u8v2 ); +UNI_DECL_OPT( u8v4 ); +UNI_DECL_OPT( u8v8 ); +UNI_DECL_OPT( u8v16 ); +UNI_DECL_OPT( u8v32 ); +UNI_DECL_OPT( u8v64 ); + +UNI_DECL_OPT( s16v2 ); +UNI_DECL_OPT( s16v4 ); +UNI_DECL_OPT( s16v8 ); +UNI_DECL_OPT( s16v16 ); +UNI_DECL_OPT( s16v32 ); + +UNI_DECL_OPT( u16v2 ); +UNI_DECL_OPT( u16v4 ); +UNI_DECL_OPT( u16v8 ); +UNI_DECL_OPT( u16v16 ); +UNI_DECL_OPT( u16v32 ); + +UNI_DECL_OPT( s32v2 ); +UNI_DECL_OPT( s32v4 ); +UNI_DECL_OPT( s32v8 ); +UNI_DECL_OPT( s32v16 ); + +UNI_DECL_OPT( u32v2 ); +UNI_DECL_OPT( u32v4 ); +UNI_DECL_OPT( u32v8 ); +UNI_DECL_OPT( u32v16 ); + +#if UNI_HAS_I64( ) +UNI_DECL_OPT( s64v2 ); +UNI_DECL_OPT( s64v4 ); +UNI_DECL_OPT( s64v8 ); + +UNI_DECL_OPT( u64v2 ); +UNI_DECL_OPT( u64v4 ); +UNI_DECL_OPT( u64v8 ); +#endif /* UNI_HAS_I64( ) */ + +#if UNI_HAS_I128( ) +UNI_DECL_OPT( s128v2 ); +UNI_DECL_OPT( s128v4 ); + +UNI_DECL_OPT( u128v2 ); +UNI_DECL_OPT( u128v4 ); +#endif /* UNI_HAS_I128( ) */ + +UNI_DECL_OPT( vs8v2 ); +UNI_DECL_OPT( vs8v4 ); +UNI_DECL_OPT( vs8v8 ); +UNI_DECL_OPT( vs8v16 ); +UNI_DECL_OPT( vs8v32 ); +UNI_DECL_OPT( vs8v64 ); + +UNI_DECL_OPT( vu8v2 ); +UNI_DECL_OPT( vu8v4 ); +UNI_DECL_OPT( vu8v8 ); +UNI_DECL_OPT( vu8v16 ); +UNI_DECL_OPT( vu8v32 ); +UNI_DECL_OPT( vu8v64 ); + +UNI_DECL_OPT( vs16v2 ); +UNI_DECL_OPT( vs16v4 ); +UNI_DECL_OPT( vs16v8 ); +UNI_DECL_OPT( vs16v16 ); +UNI_DECL_OPT( vs16v32 ); + +UNI_DECL_OPT( vu16v2 ); +UNI_DECL_OPT( vu16v4 ); +UNI_DECL_OPT( vu16v8 ); +UNI_DECL_OPT( vu16v16 ); +UNI_DECL_OPT( vu16v32 ); + +UNI_DECL_OPT( vs32v2 ); +UNI_DECL_OPT( vs32v4 ); +UNI_DECL_OPT( vs32v8 ); +UNI_DECL_OPT( vs32v16 ); + +UNI_DECL_OPT( vu32v2 ); +UNI_DECL_OPT( vu32v4 ); +UNI_DECL_OPT( vu32v8 ); +UNI_DECL_OPT( vu32v16 ); + +#if UNI_HAS_I64( ) +UNI_DECL_OPT( vs64v2 ); +UNI_DECL_OPT( vs64v4 ); +UNI_DECL_OPT( vs64v8 ); + +UNI_DECL_OPT( vu64v2 ); +UNI_DECL_OPT( vu64v4 ); +UNI_DECL_OPT( vu64v8 ); +#endif /* UNI_HAS_I64( ) */ + +#if UNI_HAS_I128( ) +UNI_DECL_OPT( vs128v2 ); +UNI_DECL_OPT( vs128v4 ); + +UNI_DECL_OPT( vu128v2 ); +UNI_DECL_OPT( vu128v4 ); +#endif /* UNI_HAS_I128( ) */ #endif /* INC_API__UNI_TYPES_OPT_VECI_H */ diff --git a/decl/include/uni/types/quant.h b/decl/include/uni/types/quant.h index cc30241..1c32e1e 100644 --- a/decl/include/uni/types/quant.h +++ b/decl/include/uni/types/quant.h @@ -10,11 +10,6 @@ #include "float.h" -struct _uni_q16d2 -{ - f16 x, y; -}; - struct _uni_q32d2 { f32 x, y; @@ -25,18 +20,6 @@ struct _uni_q64d2 f64 x, y; }; -#if UNI_HAS_F128( ) -struct _uni_q128d2 -{ - f128 x, y; -}; -#endif /* UNI_HAS_F128( ) */ - -struct _uni_q16d3 -{ - f16 x, y, z; -}; - struct _uni_q32d3 { f32 x, y, z; @@ -47,18 +30,6 @@ struct _uni_q64d3 f64 x, y, z; }; -#if UNI_HAS_F128( ) -struct _uni_q128d3 -{ - f128 x, y, z; -}; -#endif /* UNI_HAS_F128( ) */ - -struct _uni_q16d4 -{ - f16 x, y, z, a; -}; - struct _uni_q32d4 { f32 x, y, z, a; @@ -69,18 +40,6 @@ struct _uni_q64d4 f64 x, y, z, a; }; -#if UNI_HAS_F128( ) -struct _uni_q128d4 -{ - f128 x, y, z, a; -}; -#endif /* UNI_HAS_F128( ) */ - -struct _uni_q16d5 -{ - f16 x, y, z, a, b; -}; - struct _uni_q32d5 { f32 x, y, z, a, b; @@ -91,18 +50,6 @@ struct _uni_q64d5 f64 x, y, z, a, b; }; -#if UNI_HAS_F128( ) -struct _uni_q128d5 -{ - f128 x, y, z, a, b; -}; -#endif /* UNI_HAS_F128( ) */ - -struct _uni_q16d6 -{ - f16 x, y, z, a, b, c; -}; - struct _uni_q32d6 { f32 x, y, z, a, b, c; @@ -113,66 +60,29 @@ struct _uni_q64d6 f64 x, y, z, a, b, c; }; -#if UNI_HAS_F128( ) -struct _uni_q128d6 -{ - f128 x, y, z, a, b, c; -}; -#endif /* UNI_HAS_F128( ) */ - -typedef struct _uni_q16d2 q16d2; -typedef volatile struct _uni_q16d2 vq16d2; typedef struct _uni_q32d2 q32d2; typedef volatile struct _uni_q32d2 vq32d2; typedef struct _uni_q64d2 q64d2; typedef volatile struct _uni_q64d2 vq64d2; -#if UNI_HAS_F128( ) -typedef struct _uni_q128d2 q128d2; -typedef volatile struct _uni_q128d2 vq128d2; -#endif /* UNI_HAS_F128( ) */ -typedef struct _uni_q16d3 q16d3; -typedef volatile struct _uni_q16d3 vq16d3; typedef struct _uni_q32d3 q32d3; typedef volatile struct _uni_q32d3 vq32d3; typedef struct _uni_q64d3 q64d3; typedef volatile struct _uni_q64d3 vq64d3; -#if UNI_HAS_F128( ) -typedef struct _uni_q128d3 q128d3; -typedef volatile struct _uni_q128d3 vq128d3; -#endif /* UNI_HAS_F128( ) */ -typedef struct _uni_q16d4 q16d4; -typedef volatile struct _uni_q16d4 vq16d4; typedef struct _uni_q32d4 q32d4; typedef volatile struct _uni_q32d4 vq32d4; typedef struct _uni_q64d4 q64d4; typedef volatile struct _uni_q64d4 vq64d4; -#if UNI_HAS_F128( ) -typedef struct _uni_q128d4 q128d4; -typedef volatile struct _uni_q128d4 vq128d4; -#endif /* UNI_HAS_F128( ) */ -typedef struct _uni_q16d5 q16d5; -typedef volatile struct _uni_q16d5 vq16d5; typedef struct _uni_q32d5 q32d5; typedef volatile struct _uni_q32d5 vq32d5; typedef struct _uni_q64d5 q64d5; typedef volatile struct _uni_q64d5 vq64d5; -#if UNI_HAS_F128( ) -typedef struct _uni_q128d5 q128d5; -typedef volatile struct _uni_q128d5 vq128d5; -#endif /* UNI_HAS_F128( ) */ -typedef struct _uni_q16d6 q16d6; -typedef volatile struct _uni_q16d6 vq16d6; typedef struct _uni_q32d6 q32d6; typedef volatile struct _uni_q32d6 vq32d6; typedef struct _uni_q64d6 q64d6; typedef volatile struct _uni_q64d6 vq64d6; -#if UNI_HAS_F128( ) -typedef struct _uni_q128d6 q128d6; -typedef volatile struct _uni_q128d6 vq128d6; -#endif /* UNI_HAS_F128( ) */ #endif /* INC_API__UNI_TYPES_QUANT_H */ diff --git a/decl/include/uni/types/vecf.h b/decl/include/uni/types/vecf.h index 233ad7d..9993848 100644 --- a/decl/include/uni/types/vecf.h +++ b/decl/include/uni/types/vecf.h @@ -10,12 +10,6 @@ #include -typedef f16 f16v2 __attribute__( ( vector_size( 8 ) ) ); -typedef f16 f16v4 __attribute__( ( vector_size( 16 ) ) ); -typedef f16 f16v8 __attribute__( ( vector_size( 32 ) ) ); -typedef f16 f16v16 __attribute__( ( vector_size( 64 ) ) ); -typedef f16 f16v32 __attribute__( ( vector_size( 64 ) ) ); - typedef f32 f32v2 __attribute__( ( vector_size( 8 ) ) ); typedef f32 f32v4 __attribute__( ( vector_size( 16 ) ) ); typedef f32 f32v8 __attribute__( ( vector_size( 32 ) ) ); @@ -25,17 +19,6 @@ typedef f64 f64v2 __attribute__( ( vector_size( 16 ) ) ); typedef f64 f64v4 __attribute__( ( vector_size( 32 ) ) ); typedef f64 f64v8 __attribute__( ( vector_size( 64 ) ) ); -#if UNI_HAS_F128( ) -typedef f128 f128v2 __attribute__( ( vector_size( 16 ) ) ); -typedef f128 f128v4 __attribute__( ( vector_size( 32 ) ) ); -#endif /* UNI_HAS_F128() */ - -typedef volatile f16v2 vf16v2; -typedef volatile f16v4 vf16v4; -typedef volatile f16v8 vf16v8; -typedef volatile f16v16 vf16v16; -typedef volatile f16v32 vf16v32; - typedef volatile f32v2 vf32v2; typedef volatile f32v4 vf32v4; typedef volatile f32v8 vf32v8; @@ -45,9 +28,4 @@ typedef volatile f64v2 vf64v2; typedef volatile f64v4 vf64v4; typedef volatile f64v8 vf64v8; -#if UNI_HAS_F128( ) -typedef volatile f128v2 vf128v2; -typedef volatile f128v4 vf128v4; -#endif /* UNI_HAS_F128 */ - #endif /* INC_API__UNI_TYPES_VECF_H */