inference-engine/src/mkldnn_plugin/nodes/common/fp16_utils.h
// small helper function to represent uint32_t value as float32
small helper function to represent uint32_t value as float32
small helper function to represent uint32_t value as float32
inline float asfloat(uint32_t v) {
    union {
        float f;
        uint32_t i;
    } u;
    u.i = v;
    return u.f;
}
inline float asfloat ( uint32_t v ) { union { float f ; uint32_t i ; } u ; u . i = v ; return u . f ; }
small helper function to represent uint32_t value as float32
small helper function to represent uint32_t value as float32
// Both type-punning casts and unions are UB per C++ spec // But compilers usually only break code with casts