#include <libminifloat.h>
Definition at line 10 of file libminifloat.h.
MiniFloatConverter::MiniFloatConverter |
( |
| ) |
|
static float MiniFloatConverter::denorm_min |
( |
| ) |
|
|
inlinestatic |
void MiniFloatConverter::filltables |
( |
| ) |
|
|
staticprivate |
static float MiniFloatConverter::float16to32 |
( |
uint16_t |
h | ) |
|
|
inlinestatic |
static uint16_t MiniFloatConverter::float32to16 |
( |
float |
x | ) |
|
|
inlinestatic |
static uint16_t MiniFloatConverter::float32to16crop |
( |
float |
x | ) |
|
|
inlinestatic |
Fast implementation, but it crops the number so it biases low.
Definition at line 19 of file libminifloat.h.
References basetable, edm::bit_cast(), shifttable, and x.
21 return basetable[(i32 >> 23) & 0x1ff] + ((i32 & 0x007fffff) >>
shifttable[(i32 >> 23) & 0x1ff]);
To bit_cast(const From &src) noexcept
static uint16_t basetable[512]
static uint8_t shifttable[512]
static uint16_t MiniFloatConverter::float32to16round |
( |
float |
x | ) |
|
|
inlinestatic |
static bool MiniFloatConverter::isdenorm |
( |
uint16_t |
h | ) |
|
|
inlinestatic |
Definition at line 124 of file libminifloat.h.
126 return ((
h >> 10) & 0x1f) == 0 && (
h & 0x3ff) != 0;
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
static float MiniFloatConverter::max |
( |
| ) |
|
|
inlinestatic |
static float MiniFloatConverter::max32RoundedToMax16 |
( |
| ) |
|
|
inlinestatic |
Definition at line 99 of file libminifloat.h.
References edm::bit_cast().
102 constexpr uint32_t i32 = (0x8f << 23) - 1;
To bit_cast(const From &src) noexcept
static float MiniFloatConverter::min |
( |
| ) |
|
|
inlinestatic |
static float MiniFloatConverter::min32RoundedToMin16 |
( |
| ) |
|
|
inlinestatic |
template<int bits>
static float MiniFloatConverter::reduceMantissaToNbits |
( |
const float & |
f | ) |
|
|
inlinestatic |
static float MiniFloatConverter::reduceMantissaToNbits |
( |
const float & |
f, |
|
|
int |
bits |
|
) |
| |
|
inlinestatic |
template<int bits>
static float MiniFloatConverter::reduceMantissaToNbitsRounding |
( |
const float & |
f | ) |
|
|
inlinestatic |
static float MiniFloatConverter::reduceMantissaToNbitsRounding |
( |
float |
f, |
|
|
int |
bits |
|
) |
| |
|
inlinestatic |
template<typename InItr , typename OutItr >
static void MiniFloatConverter::reduceMantissaToNbitsRounding |
( |
int |
bits, |
|
|
InItr |
begin, |
|
|
InItr |
end, |
|
|
OutItr |
out |
|
) |
| |
|
inlinestatic |
uint16_t MiniFloatConverter::basetable |
|
staticprivate |
uint32_t MiniFloatConverter::exponenttable |
|
staticprivate |
uint32_t MiniFloatConverter::mantissatable |
|
staticprivate |
uint16_t MiniFloatConverter::offsettable |
|
staticprivate |
uint8_t MiniFloatConverter::shifttable |
|
staticprivate |