Fix undefined behavior (UB) from calling builtin_clz(0) am: c2b391b076 am: a738f586f1 am: 39516316e3 am: 015fd0f2a0

Original change: https://android-review.googlesource.com/c/platform/external/FP16/+/1592859

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia930ccb8b15a76816080f8185a5881005006a5e7
tree: bf795792c727b7d3d47af92580a2ac7157e72cd1
  1. bench/
  2. cmake/
  3. include/
  4. test/
  5. .gitignore
  6. Android.bp
  7. CMakeLists.txt
  8. configure.py
  9. confu.yaml
  10. LICENSE
  11. METADATA
  12. MODULE_LICENSE_MIT
  13. OWNERS
  14. README.md
  15. TEST_MAPPING
README.md

FP16

Header-only library for conversion to/from half-precision floating point formats

Features

  • Supports IEEE and ARM alternative half-precision floating-point format
    • Property converts infinities and NaNs
    • Properly converts denormal numbers, even on systems without denormal support
  • Header-only library, no installation or build required
  • Compatible with C99 and C++11
  • Fully covered with unit tests and microbenchmarks

Acknowledgements

HPC Garage logo Georgia Tech College of Computing logo

The library is developed by Marat Dukhan of Georgia Tech. FP16 is a research project at Richard Vuduc's HPC Garage lab in the Georgia Institute of Technology, College of Computing, School of Computational Science and Engineering.

This material is based upon work supported by the U.S. National Science Foundation (NSF) Award Number 1339745. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of NSF.