MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / uint_as_float

Function uint_as_float

Source/astcenc_mathlib.h:398–404  ·  view source on GitHub ↗

* @brief Unsigned integer bit-interpreted as an SP float. * * @param v The value to bitcast. * * @return The converted value. */

Source from the content-addressed store, hash-verified

396 * @return The converted value.
397 */
398static inline float uint_as_float(unsigned int v)
399{
400 // Future: Can use std:bit_cast with C++20
401 float fv;
402 std::memcpy(&fv, &v, sizeof(unsigned int));
403 return fv;
404}
405
406/**
407 * @brief Signed int bit-interpreted as an unsigned integer.

Callers 4

sf16_to_floatFunction · 0.85
error_color_nanFunction · 0.85
frexpFunction · 0.85
mpsnr_operatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected