A plain 32-bit float's bit pattern reinterpreted as a uint32_t, so instances can live in memory obtained from a capability-specific allocator (e.g. ESP32's MALLOC_CAP_32BIT, which some heap regions require for word-addressed access and won't necessarily hand out for a plain float array). Conversion to/from float is a zero-cost bitwise reinterpretation (see as_uint()/as_float()), not an encoding – unlike float16, this class is bit-for-bit identical to float and loses no precision or range; it exists purely to control storage/allocation, not to compress data.
More...
#include <float32.h>
A plain 32-bit float's bit pattern reinterpreted as a uint32_t, so instances can live in memory obtained from a capability-specific allocator (e.g. ESP32's MALLOC_CAP_32BIT, which some heap regions require for word-addressed access and won't necessarily hand out for a plain float array). Conversion to/from float is a zero-cost bitwise reinterpretation (see as_uint()/as_float()), not an encoding – unlike float16, this class is bit-for-bit identical to float and loses no precision or range; it exists purely to control storage/allocation, not to compress data.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ float32() [1/3]
◆ float32() [2/3]
◆ float32() [3/3]
◆ as_float()
| static float as_float |
( |
uint32_t |
x | ) |
|
|
inlinestaticprotected |
◆ as_uint()
| static uint32_t as_uint |
( |
float |
x | ) |
|
|
inlinestaticprotected |
◆ operator double()
◆ operator float()
◆ operator int() [1/2]
◆ operator int() [2/2]
◆ operator!=()
| bool operator!= |
( |
float32 |
other | ) |
const |
|
inline |
◆ operator<()
| bool operator< |
( |
float32 |
other | ) |
const |
|
inline |
◆ operator<=()
| bool operator<= |
( |
float32 |
other | ) |
const |
|
inline |
◆ operator==()
| bool operator== |
( |
float32 |
other | ) |
const |
|
inline |
◆ operator>()
| bool operator> |
( |
float32 |
other | ) |
const |
|
inline |
◆ operator>=()
| bool operator>= |
( |
float32 |
other | ) |
const |
|
inline |
◆ value
The documentation for this class was generated from the following file:
- src/AudioTools/CoreAudio/AudioBasic/float32.h