File: tables.h

package info (click to toggle)
fp16 0.0~git20200514.4dfe081-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 692 kB
  • sloc: cpp: 6,683; ansic: 675; python: 140; makefile: 11
file content (13 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
#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];
}