#include <libminifloat.h>
Definition at line 9 of file libminifloat.h.
◆ MiniFloatConverter()
MiniFloatConverter::MiniFloatConverter |
( |
| ) |
|
◆ denorm_min()
static float MiniFloatConverter::denorm_min |
( |
| ) |
|
|
inlinestatic |
◆ filltables()
void MiniFloatConverter::filltables |
( |
| ) |
|
|
staticprivate |
◆ float16to32()
static float MiniFloatConverter::float16to32 |
( |
uint16_t |
h | ) |
|
|
inlinestatic |
◆ float32to16()
static uint16_t MiniFloatConverter::float32to16 |
( |
float |
x | ) |
|
|
inlinestatic |
◆ float32to16crop()
static uint16_t MiniFloatConverter::float32to16crop |
( |
float |
x | ) |
|
|
inlinestatic |
◆ float32to16round()
static uint16_t MiniFloatConverter::float32to16round |
( |
float |
x | ) |
|
|
inlinestatic |
◆ isdenorm()
static bool MiniFloatConverter::isdenorm |
( |
uint16_t |
h | ) |
|
|
inlinestatic |
Definition at line 167 of file libminifloat.h.
169 return ((
h >> 10) & 0x1f) == 0 && (
h & 0x3ff) != 0;
◆ max()
static float MiniFloatConverter::max |
( |
| ) |
|
|
inlinestatic |
◆ max32RoundedToMax16()
static float MiniFloatConverter::max32RoundedToMax16 |
( |
| ) |
|
|
inlinestatic |
◆ min()
static float MiniFloatConverter::min |
( |
| ) |
|
|
inlinestatic |
◆ min32RoundedToMin16()
static float MiniFloatConverter::min32RoundedToMin16 |
( |
| ) |
|
|
inlinestatic |
◆ reduceMantissaToNbits() [1/2]
template<int bits>
static float MiniFloatConverter::reduceMantissaToNbits |
( |
const float & |
f | ) |
|
|
inlinestatic |
Definition at line 49 of file libminifloat.h.
50 static_assert(bits <= 23,
"max mantissa size is 23 bits");
51 constexpr uint32_t mask = (0xFFFFFFFF >> (23 - bits)) << (23 - bits);
References conv, and f.
Referenced by CompressionElement::pack().
◆ reduceMantissaToNbits() [2/2]
static float MiniFloatConverter::reduceMantissaToNbits |
( |
const float & |
f, |
|
|
int |
bits |
|
) |
| |
|
inlinestatic |
Definition at line 60 of file libminifloat.h.
61 uint32_t mask = (0xFFFFFFFF >> (23 - bits)) << (23 - bits);
References conv, and f.
◆ reduceMantissaToNbitsRounding() [1/3]
template<int bits>
static float MiniFloatConverter::reduceMantissaToNbitsRounding |
( |
const float & |
f | ) |
|
|
inlinestatic |
◆ reduceMantissaToNbitsRounding() [2/3]
static float MiniFloatConverter::reduceMantissaToNbitsRounding |
( |
float |
f, |
|
|
int |
bits |
|
) |
| |
|
inlinestatic |
Definition at line 107 of file libminifloat.h.
108 return ReduceMantissaToNbitsRounding(bits)(
f);
References f.
◆ reduceMantissaToNbitsRounding() [3/3]
template<typename InItr , typename OutItr >
static void MiniFloatConverter::reduceMantissaToNbitsRounding |
( |
int |
bits, |
|
|
InItr |
begin, |
|
|
InItr |
end, |
|
|
OutItr |
out |
|
) |
| |
|
inlinestatic |
◆ basetable
uint16_t MiniFloatConverter::basetable |
|
staticprivate |
◆ exponenttable
uint32_t MiniFloatConverter::exponenttable |
|
staticprivate |
◆ mantissatable
uint32_t MiniFloatConverter::mantissatable |
|
staticprivate |
◆ offsettable
uint16_t MiniFloatConverter::offsettable |
|
staticprivate |
◆ shifttable
uint8_t MiniFloatConverter::shifttable |
|
staticprivate |