#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... | |
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, 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 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::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().
|
staticprivate |
Definition at line 42 of file libminifloat.h.
Referenced by filltables(), float32to16crop(), and float32to16round().
|
staticprivate |
Definition at line 40 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 39 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 41 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 43 of file libminifloat.h.
Referenced by filltables(), float32to16crop(), and float32to16round().