Home
last modified time | relevance | path

Searched refs:floatUnion (Results 1 – 2 of 2) sorted by relevance

/third_party/skia/src/core/
DSkHalf.cpp38 FloatUIntUnion floatUnion; in SkFloatToHalf() local
39 floatUnion.fFloat = f; in SkFloatToHalf()
41 uint32_t sign = floatUnion.fUInt & sign_mask; in SkFloatToHalf()
42 floatUnion.fUInt ^= sign; in SkFloatToHalf()
50 if (floatUnion.fUInt >= f32infty) in SkFloatToHalf()
52 o = (floatUnion.fUInt > f32infty) ? 0x7e00 : 0x7c00; in SkFloatToHalf()
55 floatUnion.fUInt &= round_mask; in SkFloatToHalf()
56 floatUnion.fFloat *= magic.fFloat; in SkFloatToHalf()
57 floatUnion.fUInt -= round_mask; in SkFloatToHalf()
59 if (floatUnion.fUInt > f16infty) { in SkFloatToHalf()
[all …]
/third_party/skia/docs/examples/
DColor_Type_RGBA_F16.cpp13 FloatUIntUnion floatUnion; in FloatToHalf() local
14 floatUnion.fFloat = f; in FloatToHalf()
15 uint32_t sign = floatUnion.fUInt & 0x80000000u; in FloatToHalf()
16 floatUnion.fUInt ^= sign; in FloatToHalf()
17 floatUnion.fUInt &= round_mask; in FloatToHalf()
18 floatUnion.fFloat *= magic.fFloat; in FloatToHalf()
19 floatUnion.fUInt -= round_mask; in FloatToHalf()
20 return (floatUnion.fUInt >> 13) | (sign >> 16); in FloatToHalf()