* @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. */
| 1059 | * convert them back again. This is the first half of that flip. |
| 1060 | */ |
| 1061 | ASTCENC_SIMD_INLINE vint4 float_as_int(vfloat4 a) |
| 1062 | { |
| 1063 | static_assert(sizeof(int) == sizeof(float), "int must be 32-bit"); |
| 1064 | |
| 1065 | vint4 r; |
| 1066 | std::memcpy(r.m, a.m, 4 * sizeof(int)); |
| 1067 | return r; |
| 1068 | } |
| 1069 | |
| 1070 | /** |
| 1071 | * @brief Return a integer value as a float bit pattern (i.e. no conversion). |
nothing calls this directly
no outgoing calls
no test coverage detected