Convert bfloat16 to float * * @param[in] v Bfloat16 value to convert to float * * @return Converted value */
| 96 | * @return Converted value |
| 97 | */ |
| 98 | inline float bf16_to_float(const uint16_t &v) |
| 99 | { |
| 100 | const uint32_t lv = (v << 16); |
| 101 | float fp; |
| 102 | memcpy(&fp, &lv, sizeof(lv)); |
| 103 | return fp; |
| 104 | } |
| 105 | } // namespace |
| 106 | |
| 107 | /** Brain floating point representation class */ |
no outgoing calls
no test coverage detected