Lines Matching defs:FP16_BITS

67 #define FP16_BITS 16
83 #define FP16_MANT_BITS (FP16_BITS - FP16_EXP_BITS - 1)
302 return sgn << (FP16_BITS - 1) | exp << FP16_MANT_BITS | FP16_MANT(mnt);
393 *sgn = x >> (FP16_BITS - 1);
1419 // Convert to FP16_BITS bits, collapsing error into bottom bit:
1420 x_mnt = lsr32(x_mnt, FP16_BITS - 1) | !!lsl32(x_mnt, FP16_BITS + 1);
1577 // Normalise into FP16_BITS bits, collapsing error into bottom bit:
1579 x_mnt = x_mnt >> (FP16_BITS - 1) | !!(uint16_t)(x_mnt << 1);
1791 x_exp = a_exp - b_exp + (FP16_EXP_BIAS + FP16_BITS + 2 * FP16_EXP_BITS - 3);
1796 // Normalise into FP16_BITS bits, collapsing error into bottom bit:
1798 x_mnt = x_mnt >> (FP16_BITS - 1) | !!(uint16_t)(x_mnt << 1);
2360 return op & ~(1ULL << (FP16_BITS - 1));
2528 return fp32_pack(op >> (FP16_BITS - 1), FP32_EXP_INF,
2544 return fp64_pack(op >> (FP16_BITS - 1), FP64_EXP_INF,
2639 result = ((uint16_t)sgn << (FP16_BITS - 1) |
2640 ((1ULL << (FP16_BITS - 1)) - 1));
2650 mnt >> (FP32_MANT_BITS - FP16_BITS) |
2651 !!(mnt & ((1ULL << (FP32_MANT_BITS - FP16_BITS)) - 1)),
2688 result = ((uint16_t)sgn << (FP16_BITS - 1) |
2689 ((1ULL << (FP16_BITS - 1)) - 1));
2699 mnt >> (FP64_MANT_BITS - FP16_BITS) |
2700 !!(mnt & ((1ULL << (FP64_MANT_BITS - FP16_BITS)) - 1)),
2739 (uint32_t)mnt << (FP32_MANT_BITS - FP16_BITS + 1));
2816 (uint64_t)mnt << (FP64_MANT_BITS - FP16_BITS + 1));
3479 return op ^ 1ULL << (FP16_BITS - 1);
3540 (mnt >> (FP16_BITS - 8) & 127)];
3756 (mnt >> (FP16_BITS - 10) | 1) + 1) >> 1;
4092 uint16_t x = expint - exp >= FP16_BITS ? 0 : mnt >> (expint - exp);
4093 int err = exp < expint - FP16_BITS ? 1 :
4095 ((uint16_t)(mnt << 2 << (FP16_BITS + exp - expint)) != 0));
4380 fp16_muladd(coeff[op2 >> (FP16_BITS - 1)][coeff_index], op1,
4468 result = (result & ~(1ULL << (FP16_BITS - 1))) |
4469 op2 << (FP16_BITS - 1);
4520 return op1 ^ ((op2 >> 1) << (FP16_BITS - 1));
4613 if (u ? x >= 1ULL << FP16_BITS :
4614 !(x < 1ULL << (FP16_BITS - 1) ||
4615 (uint64_t)-x <= (uint64_t)1 << (FP16_BITS - 1))) {
4617 x = ((uint16_t)!u << (FP16_BITS - 1)) - !sgn;
4840 // Normalise into FP16_BITS bits, collapsing error into bottom bit:
4842 x_mnt = (x_mnt >> (FP64_BITS - FP16_BITS - 1) |
4843 !!(x_mnt & ((1ULL << (FP64_BITS - FP16_BITS - 1)) - 1)));