[Libclc-dev] [PATCH 1/3] Add MAXFLOAT
Tom Stellard
tom at stellard.net
Mon Jun 23 09:21:39 PDT 2014
On Mon, Jun 23, 2014 at 04:33:25PM +0100, Jeroen Ketema wrote:
> Align definitions while we are here.
> ---
LGTM.
> generic/include/clc/float/definitions.h | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/generic/include/clc/float/definitions.h b/generic/include/clc/float/definitions.h
> index c395964..cd65324 100644
> --- a/generic/include/clc/float/definitions.h
> +++ b/generic/include/clc/float/definitions.h
> @@ -1,6 +1,7 @@
> -#define INFINITY __builtin_inff()
> -#define NAN __builtin_nanf("")
> -#define HUGE_VALF __builtin_huge_valf()
> +#define MAXFLOAT 0x1.fffffep127f
> +#define HUGE_VALF __builtin_huge_valf()
> +#define INFINITY __builtin_inff()
> +#define NAN __builtin_nanf("")
>
> #define FLT_DIG 6
> #define FLT_MANT_DIG 24
> @@ -9,7 +10,7 @@
> #define FLT_MIN_10_EXP -37
> #define FLT_MIN_EXP -125
> #define FLT_RADIX 2
> -#define FLT_MAX 0x1.fffffep127f
> +#define FLT_MAX MAXFLOAT
> #define FLT_MIN 0x1.0p-126f
> #define FLT_EPSILON 0x1.0p-23f
>
> @@ -29,7 +30,7 @@
>
> #ifdef cl_khr_fp64
>
> -#define HUGE_VAL __builtin_huge_val()
> +#define HUGE_VAL __builtin_huge_val()
>
> #define DBL_DIG 15
> #define DBL_MANT_DIG 53
> --
> 1.8.5.2 (Apple Git-48)
>
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
More information about the Libclc-dev
mailing list