Lines Matching refs:inp

65 static uint32_t clz32(uint32_t inp)
69 __asm__("bsrl %1, %0": "=r"(bsr):"r"(inp | 1));
73 return __clz(inp); /* armcc builtin */
77 __asm__("clz %0, %1": "=r"(lz):"r"(inp));
82 if (inp >= UINT32_C(0x10000))
84 inp >>= 16;
87 if (inp >= UINT32_C(0x100))
89 inp >>= 8;
92 return summa + clz_table[inp];
109 static uint32_t rtne_shift32(uint32_t inp, uint32_t shamt)
112 uint32_t inp2 = inp + (vl1 >> 1); /* added 0.5 ULP */
113 uint32_t msk = (inp | UINT32_C(1)) & vl1; /* nonzero if odd. '| 1' forces it to 1 if the shamt is 0. */
120 static uint32_t rtna_shift32(uint32_t inp, uint32_t shamt)
123 inp += vl1;
124 inp >>= shamt;
125 return inp;
128 static uint32_t rtup_shift32(uint32_t inp, uint32_t shamt)
131 inp += vl1;
132 inp--;
133 inp >>= shamt;
134 return inp;
138 static sf32 sf16_to_sf32(sf16 inp)
140 uint32_t inpx = inp;
178 /* NaN: the exponent field of 'inp' is non-zero. */
194 static sf16 sf32_to_sf16(sf32 inp, roundmode rmode)
248 uint32_t idx = rmode + tab[inp >> 23];
275 p = (inp - 1) & UINT32_C(0x800000); /* zero if INF, nonzero if NaN. */
276 return static_cast<sf16>(((inp + vlx) >> 13) | (p >> 14));
283 -inp will set the MSB if the input number is nonzero.
284 Thus (-inp) >> 31 will turn into 0 if the input number is 0 and 1 otherwise.
286 return static_cast<sf16>(static_cast<uint32_t>((-static_cast<int32_t>(inp))) >> 31);
299 return static_cast<sf16>(((vlx - inp) >> 31) + UINT32_C(0x8000));
352 return static_cast<sf16>((inp + vlx) >> 13);
357 p = inp + vlx;
358 p += (inp >> 13) & 1;
373 p = 126 - ((inp >> 23) & 0xFF);
374 return static_cast<sf16>((((inp & UINT32_C(0x7FFFFF)) + UINT32_C(0x800000)) >> p) | vlx);
378 p = 126 - ((inp >> 23) & 0xFF);
379 return static_cast<sf16>(rtup_shift32((inp & UINT32_C(0x7FFFFF)) + UINT32_C(0x800000), p) | vlx);
383 p = 126 - ((inp >> 23) & 0xFF);
384 return static_cast<sf16>(rtna_shift32((inp & UINT32_C(0x7FFFFF)) + UINT32_C(0x800000), p) | vlx);
388 p = 126 - ((inp >> 23) & 0xFF);
389 return static_cast<sf16>(rtne_shift32((inp & UINT32_C(0x7FFFFF)) + UINT32_C(0x800000), p) | vlx);