#include <libminifloat.h>
Definition at line 7 of file libminifloat.h.
MiniFloatConverter::MiniFloatConverter |
( |
| ) |
|
static float MiniFloatConverter::denorm_min |
( |
| ) |
|
|
inlinestatic |
Definition at line 109 of file libminifloat.h.
References conv.
110 union {
float flt; uint32_t i32; }
conv;
111 conv.i32 = 0x33800000;
static HepMC::IO_HEPEVT conv
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, conv, shifttable, and x.
20 union {
float flt; uint32_t i32; }
conv;
static HepMC::IO_HEPEVT conv
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 115 of file libminifloat.h.
117 return ((
h >> 10) & 0x1f) == 0 && (
h & 0x3ff) != 0;
static float MiniFloatConverter::max |
( |
| ) |
|
|
inlinestatic |
Definition at line 79 of file libminifloat.h.
References conv.
80 union {
float flt; uint32_t i32; }
conv;
81 conv.i32 = 0x477fe000;
static HepMC::IO_HEPEVT conv
static float MiniFloatConverter::max32RoundedToMax16 |
( |
| ) |
|
|
inlinestatic |
Definition at line 86 of file libminifloat.h.
References conv.
87 union {
float flt; uint32_t i32; }
conv;
90 conv.i32 = (0x8f<<23) - 1;
static HepMC::IO_HEPEVT conv
static float MiniFloatConverter::min |
( |
| ) |
|
|
inlinestatic |
Definition at line 94 of file libminifloat.h.
References conv.
95 union {
float flt; uint32_t i32; }
conv;
96 conv.i32 = 0x38800000;
static HepMC::IO_HEPEVT conv
static float MiniFloatConverter::min32RoundedToMin16 |
( |
| ) |
|
|
inlinestatic |
Definition at line 101 of file libminifloat.h.
References conv.
102 union {
float flt; uint32_t i32; }
conv;
105 conv.i32 = (0x71<<23);
static HepMC::IO_HEPEVT conv
template<int bits>
static float MiniFloatConverter::reduceMantissaToNbits |
( |
const float & |
f | ) |
|
|
inlinestatic |
Definition at line 39 of file libminifloat.h.
References bits, constexpr, conv, f, and RecoTauDiscriminantConfiguration::mask.
Referenced by CompressionElement::pack().
41 static_assert(
bits <= 23,
"max mantissa size is 23 bits");
43 union {
float flt; uint32_t i32; }
conv;
static HepMC::IO_HEPEVT conv
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
static float MiniFloatConverter::reduceMantissaToNbits |
( |
const float & |
f, |
|
|
int |
bits |
|
) |
| |
|
inlinestatic |
Definition at line 48 of file libminifloat.h.
References bits, conv, f, and RecoTauDiscriminantConfiguration::mask.
51 union {
float flt; uint32_t i32; }
conv;
static HepMC::IO_HEPEVT conv
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
template<int bits>
static float MiniFloatConverter::reduceMantissaToNbitsRounding |
( |
const float & |
f | ) |
|
|
inlinestatic |
Definition at line 58 of file libminifloat.h.
References bits, constexpr, conv, f, RecoTauDiscriminantConfiguration::mask, and edm::shift.
60 static_assert(
bits <= 23,
"max mantissa size is 23 bits");
67 union {
float flt; uint32_t i32; }
conv;
69 if (
conv.i32 & test) {
70 uint32_t mantissa = (
conv.i32 & low23) >> shift;
71 if (mantissa < maxn) mantissa++;
72 conv.i32 = (
conv.i32 & hi9) | (mantissa << shift);
static HepMC::IO_HEPEVT conv
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
static unsigned int const shift
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 |