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

Function float_as_int

Source/astcenc_vecmathlib_avx2_8.h:1001–1004  ·  view source on GitHub ↗

* @brief Return a float value as an integer bit pattern (i.e. no conversion). * * It is a common trick to convert floats into integer bit patterns, perform * some bit hackery based on knowledge they are IEEE 754 layout, and then * convert them back again. This is the first half of that flip. */

Source from the content-addressed store, hash-verified

999 * convert them back again. This is the first half of that flip.
1000 */
1001ASTCENC_SIMD_INLINE vint8 float_as_int(vfloat8 a)
1002{
1003 return vint8(_mm256_castps_si256(a.m));
1004}
1005
1006/**
1007 * @brief Return a integer value as a float bit pattern (i.e. no conversion).

Callers

nothing calls this directly

Calls 1

vint8Class · 0.70

Tested by

no test coverage detected