util: add float to float16 conversions with RTZ and RTNE
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 4 Jul 2018 10:02:30 +0000 (12:02 +0200)
committerAndres Gomez <agomez@igalia.com>
Tue, 17 Sep 2019 20:39:18 +0000 (23:39 +0300)
commit733ede8ff6c107ff2acb2dc6ba647d3ad2b3b6dc
tree735245f9684d6aa85ee777a8cc7beb291bdeb35c
parent153c714f2af932e7681627a4c7c9f3521d686100
util: add float to float16 conversions with RTZ and RTNE

In order to be coherent with the pre-existent functions, this new API
is the one meant to be used when doing half float to float
conversions. It is no more than a wrapper for the softfloat.h API but
we meant to keep that one private.

v2:
- Replace custom f32 -> f16 RTZ implementation with the softfloat
  one (Andres).

v3:
- Added API usage clarifying comments (Caio).

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/util/half_float.c
src/util/half_float.h