• Home
  • Raw
  • Download

Lines Matching refs:h_mant

141       uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);  in cl_half_from_float()  local
142 h_mant |= 0x200; in cl_half_from_float()
143 return (sign << 15) | CL_HALF_EXP_MASK | h_mant; in cl_half_from_float()
182 uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos); in cl_half_from_float() local
193 h_mant += 1; in cl_half_from_float()
198 if (h_mant & 0x1) in cl_half_from_float()
199 h_mant += 1; in cl_half_from_float()
209 h_mant += 1; in cl_half_from_float()
216 h_mant += 1; in cl_half_from_float()
222 if (h_mant & 0x400) in cl_half_from_float()
225 h_mant = 0; in cl_half_from_float()
228 return (sign << 15) | (h_exp << 10) | h_mant; in cl_half_from_float()
267 uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos); in cl_half_from_double() local
268 h_mant |= 0x200; in cl_half_from_double()
269 return (sign << 15) | CL_HALF_EXP_MASK | h_mant; in cl_half_from_double()
308 uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos); in cl_half_from_double() local
319 h_mant += 1; in cl_half_from_double()
324 if (h_mant & 0x1) in cl_half_from_double()
325 h_mant += 1; in cl_half_from_double()
335 h_mant += 1; in cl_half_from_double()
342 h_mant += 1; in cl_half_from_double()
348 if (h_mant & 0x400) in cl_half_from_double()
351 h_mant = 0; in cl_half_from_double()
354 return (sign << 15) | (h_exp << 10) | h_mant; in cl_half_from_double()
375 uint16_t h_mant = h & 0x3FF; in cl_half_to_float() local
386 if (h_mant) in cl_half_to_float()
389 uint32_t f_mant = h_mant << (CL_FLT_MANT_DIG - CL_HALF_MANT_DIG); in cl_half_to_float()
405 if (h_mant == 0) in cl_half_to_float()
416 while ((h_mant & 0x400) == 0) in cl_half_to_float()
418 h_mant <<= 1; in cl_half_to_float()
421 h_mant &= 0x3FF; in cl_half_to_float()
426 f32.i = (sign << 31) | (f_exp << 23) | (h_mant << 13); in cl_half_to_float()