[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 5/8] fpu/softfloat: define brain floating-point types
From: |
Richard Henderson |
Subject: |
Re: [RFC PATCH 5/8] fpu/softfloat: define brain floating-point types |
Date: |
Mon, 13 Jul 2020 12:26:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 7/12/20 4:45 PM, LIU Zhiwei wrote:
> Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
> ---
> include/fpu/softfloat-types.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h
> index 7680193ebc..8f8fdfeecf 100644
> --- a/include/fpu/softfloat-types.h
> +++ b/include/fpu/softfloat-types.h
> @@ -112,6 +112,14 @@ typedef struct {
> #define make_float128(high_, low_) ((float128) { .high = high_, .low = low_
> })
> #define make_float128_init(high_, low_) { .high = high_, .low = low_ }
>
> +/*
> + * Software brain floating-point types
> + */
> +typedef uint16_t bfloat16;
> +#define bfloat16_val(x) (x)
> +#define make_bfloat16(x) (x)
> +#define const_bfloat16(x) (x)
I do not like the val/make/const macros. I've been meaning to get them
everywhere.
The word "brain" is better translated as "neural-network" in english.
r~