-const int FP64_BIAS = 1023;
-const int FP64_MANTISSA_BITS = 52;
-const int FP64_EXPONENT_BITS = 11;
-const int FP64_MAX_EXPONENT = (1 << FP64_EXPONENT_BITS) - 1;
-
-const int FP32_BIAS = 127;
-const int FP32_MANTISSA_BITS = 23;
-const int FP32_EXPONENT_BITS = 8;
-const int FP32_MAX_EXPONENT = (1 << FP32_EXPONENT_BITS) - 1;
-
-const int FP16_BIAS = 15;
-const int FP16_MANTISSA_BITS = 10;
-const int FP16_EXPONENT_BITS = 5;
-const int FP16_MAX_EXPONENT = (1 << FP16_EXPONENT_BITS) - 1;
-
-} // namespace
-
-double fp16_to_fp64(fp16_int_t x)
-{
- return fp_upconvert<fp16_int_t,
- FP16_BIAS, FP16_MANTISSA_BITS, FP16_EXPONENT_BITS, FP16_MAX_EXPONENT,
- FP64_BIAS, FP64_MANTISSA_BITS, FP64_EXPONENT_BITS, FP64_MAX_EXPONENT>(x);
-}
-
-fp16_int_t fp64_to_fp16(double x)
-{
- return fp_downconvert<fp16_int_t,
- FP16_BIAS, FP16_MANTISSA_BITS, FP16_EXPONENT_BITS, FP16_MAX_EXPONENT,
- FP64_BIAS, FP64_MANTISSA_BITS, FP64_EXPONENT_BITS, FP64_MAX_EXPONENT>(x);
-}
-
-double fp32_to_fp64(fp32_int_t x)
-{
- return fp_upconvert<fp32_int_t,
- FP32_BIAS, FP32_MANTISSA_BITS, FP32_EXPONENT_BITS, FP32_MAX_EXPONENT,
- FP64_BIAS, FP64_MANTISSA_BITS, FP64_EXPONENT_BITS, FP64_MAX_EXPONENT>(x);
-}
-
-fp32_int_t fp64_to_fp32(double x)
-{
- return fp_downconvert<fp32_int_t,
- FP32_BIAS, FP32_MANTISSA_BITS, FP32_EXPONENT_BITS, FP32_MAX_EXPONENT,
- FP64_BIAS, FP64_MANTISSA_BITS, FP64_EXPONENT_BITS, FP64_MAX_EXPONENT>(x);
-}