Skip to content

Commit

Permalink
remove half- and quad-precision floats
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholatian committed Apr 14, 2021
1 parent acb831b commit 86ec29d
Show file tree
Hide file tree
Showing 9 changed files with 119 additions and 187 deletions.
18 changes: 0 additions & 18 deletions decl/include/uni/types/complexf.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@

#include <uni/types/float.h>

#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;

Expand Down
13 changes: 0 additions & 13 deletions decl/include/uni/types/float.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
8 changes: 0 additions & 8 deletions decl/include/uni/types/opt/complexf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ ) */

Expand Down
6 changes: 0 additions & 6 deletions decl/include/uni/types/opt/float.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@
#include <uni/types/float.h>
#include <uni/types/opt/common.h>

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 */
30 changes: 0 additions & 30 deletions decl/include/uni/types/opt/quant.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,29 @@
#include <uni/types/quant.h>
#include <uni/types/opt/common.h>

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 */
10 changes: 10 additions & 0 deletions decl/include/uni/types/opt/vecf.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,15 @@
#define INC_API__UNI_TYPES_OPT_VECF_H

#include <uni/types/vecf.h>
#include <uni/types/opt/common.h>

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 */
109 changes: 109 additions & 0 deletions decl/include/uni/types/opt/veci.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,114 @@
#define INC_API__UNI_TYPES_OPT_VECI_H

#include <uni/types/veci.h>
#include <uni/types/opt/common.h>

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 */
Loading

0 comments on commit 86ec29d

Please sign in to comment.