#include <libminifloat.h>
Public Member Functions | |
MiniFloatConverter () | |
Static Public Member Functions | |
static float | float16to32 (uint16_t h) |
static uint16_t | float32to16 (float x) |
static uint16_t | float32to16crop (float x) |
Fast implementation, but it crops the number so it biases low. More... | |
static uint16_t | float32to16round (float x) |
Slower implementation, but it rounds to avoid biases. More... | |
template<int bits> | |
static float | reduceMantissaToNbits (const float &f) |
Static Private Member Functions | |
static void | filltables () |
Static Private Attributes | |
static uint16_t | basetable [512] |
static uint32_t | exponenttable [64] |
static uint32_t | mantissatable [2048] |
static uint16_t | offsettable [64] |
static uint8_t | shifttable [512] |
Definition at line 7 of file libminifloat.h.
MiniFloatConverter::MiniFloatConverter | ( | ) |
|
staticprivate |
Definition at line 18 of file libminifloat.cc.
References basetable, alignCSCRings::e, exponenttable, i, visualization-live-secondInstance_cfg::m, mantissatable, offsettable, and shifttable.
Referenced by MiniFloatConverter().
|
inlinestatic |
Definition at line 10 of file libminifloat.h.
References conv, exponenttable, mantissatable, and offsettable.
Referenced by convertPackedEtaToPackedY(), pat::MET::PackedMETUncertainty::unpack(), pat::PackedGenParticle::unpack(), pat::PackedCandidate::unpack(), BeamCurrentInfo::unpackData(), and pat::PackedCandidate::unpackVtx().
|
inlinestatic |
Definition at line 15 of file libminifloat.h.
References float32to16round().
Referenced by pat::MET::PackedMETUncertainty::pack(), pat::PackedGenParticle::pack(), pat::PackedCandidate::pack(), BeamCurrentInfo::packData(), and pat::PackedCandidate::packVtx().
|
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.
|
inlinestatic |
Slower implementation, but it rounds to avoid biases.
Definition at line 25 of file libminifloat.h.
References newFWLiteAna::base, compare_using_db::base2, basetable, conv, edm::shift, shifttable, and x.
Referenced by float32to16().
|
inlinestatic |
Definition at line 39 of file libminifloat.h.
References bits, constexpr, conv, and f.
|
staticprivate |
Definition at line 52 of file libminifloat.h.
Referenced by filltables(), float32to16crop(), and float32to16round().
|
staticprivate |
Definition at line 50 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 49 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 51 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 53 of file libminifloat.h.
Referenced by filltables(), float32to16crop(), and float32to16round().