You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
582 B

#include <cstdint>
namespace fp16 {
/* FP32 conversion results for FP16 numbers in range [1.0h, 2.0h) */
extern const uint32_t normalizedValues[1024];
/* FP32 conversion results for FP16 numbers in range [0.0h, HALF_MIN) */
extern const uint32_t denormalizedValues[1024];
/* FP32 numbers such that FP16(fp32) < as_half(as_uint16(1.0h) | index) for fp32 < normalizedRanges[index] */
extern const uint32_t normalizedRanges[1024];
/* FP32 numbers such that FP16(fp32) < as_half(index) for fp32 < denormalizedRanges[index] */
extern const uint32_t denormalizedRanges[1024];
}