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

Function int_as_float

Source/astcenc_mathlib.h:368–374  ·  view source on GitHub ↗

* @brief 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

366 * @return The converted value.
367 */
368static inline float int_as_float(int v)
369{
370 // Future: Can use std:bit_cast with C++20
371 float fv;
372 std::memcpy(&fv, &v, sizeof(int));
373 return fv;
374}
375
376/**
377 * @brief SP float bit-interpreted as an unsigned integer.

Callers 5

change_signFunction · 0.70
exp2Function · 0.70
log2Function · 0.70
two_to_the_nFunction · 0.70
frexpFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected