[Mesa-dev] [PATCH 12/28] util: add fp64 -> fp32 conversion support for RTNE and RTZ rounding modes

Matt Turner mattst88 at gmail.com
Fri Dec 7 02:03:56 UTC 2018


On Wed, Dec 5, 2018 at 7:56 AM Samuel Iglesias Gonsálvez
<siglesias at igalia.com> wrote:
>
> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> ---
>  src/util/Makefile.sources |   2 +
>  src/util/double.c         | 197 ++++++++++++++++++++++++++++++++++++++
>  src/util/double.h         |  46 +++++++++
>  src/util/meson.build      |   2 +
>  4 files changed, 247 insertions(+)
>  create mode 100644 src/util/double.c
>  create mode 100644 src/util/double.h

Why do we need software routines for this? Couldn't we set/reset the
rounding mode (fegetround/fegetround) around a double -> float
conversion?


More information about the mesa-dev mailing list