#include <libminifloat.h>
Classes | |
class | ReduceMantissaToNbitsRounding |
Public Member Functions | |
MiniFloatConverter () | |
Static Public Member Functions | |
static float | denorm_min () |
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 bool | isdenorm (uint16_t h) |
static float | max () |
static float | max32RoundedToMax16 () |
static float | min () |
static float | min32RoundedToMin16 () |
template<int bits> | |
static float | reduceMantissaToNbits (const float &f) |
static float | reduceMantissaToNbits (const float &f, int bits) |
template<int bits> | |
static float | reduceMantissaToNbitsRounding (const float &f) |
static float | reduceMantissaToNbitsRounding (float f, int bits) |
template<typename InItr , typename OutItr > | |
static void | reduceMantissaToNbitsRounding (int bits, InItr begin, InItr end, OutItr out) |
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 10 of file libminifloat.h.
MiniFloatConverter::MiniFloatConverter | ( | ) |
|
inlinestatic |
Definition at line 119 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr().
|
staticprivate |
Definition at line 20 of file libminifloat.cc.
References basetable, MillePedeFileConverter_cfg::e, exponenttable, mps_fire::i, createfilelist::int, visualization-live-secondInstance_cfg::m, mantissatable, offsettable, and shifttable.
Referenced by MiniFloatConverter().
|
inlinestatic |
Definition at line 13 of file libminifloat.h.
References exponenttable, h, mantissatable, and offsettable.
Referenced by convertPackedEtaToPackedY(), CompressionElement::unpack(), pat::MET::PackedMETUncertainty::unpack(), pat::PackedGenParticle::unpack(), pat::PackedCandidate::unpack(), BeamCurrentInfo::unpackData(), pat::MET::PackedMETUncertainty::unpackDpx(), pat::MET::PackedMETUncertainty::unpackDpy(), pat::MET::PackedMETUncertainty::unpackDSumEt(), and pat::PackedCandidate::unpackVtx().
|
inlinestatic |
Definition at line 17 of file libminifloat.h.
References float32to16round(), and x.
Referenced by CompressionElement::pack(), 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, shifttable, and x.
|
inlinestatic |
Slower implementation, but it rounds to avoid biases.
Definition at line 24 of file libminifloat.h.
References newFWLiteAna::base, compare_using_db::base2, basetable, edm::shift, shifttable, and x.
Referenced by float32to16().
|
inlinestatic |
Definition at line 124 of file libminifloat.h.
References h.
|
inlinestatic |
Definition at line 93 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr().
Referenced by pat::PackedCandidate::pack().
|
inlinestatic |
Definition at line 99 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr().
|
inlinestatic |
Definition at line 106 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr().
|
inlinestatic |
Definition at line 112 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr().
|
inlinestatic |
Definition at line 38 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), f, and ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask.
Referenced by CompressionElement::pack().
|
inlinestatic |
Definition at line 45 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, f, and ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask.
|
inlinestatic |
Definition at line 79 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, and f.
Referenced by nanoaod::flatTableHelper::MaybeMantissaReduce< float >::bulk(), TypedValueMapVariable< ObjType, TIn, StringFunctor, ValType >::eval(), FuncVariable< ObjType, StringFunctor, ValType >::fill(), nanoaod::flatTableHelper::MaybeMantissaReduce< float >::one(), HLTScoutingPrimaryVertexProducer::produce(), HLTScoutingTrackProducer::produce(), HLTScoutingPFProducer::produce(), and HLTScoutingEgammaProducer::produce().
|
inlinestatic |
Definition at line 84 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, and f.
|
inlinestatic |
Definition at line 89 of file libminifloat.h.
References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, mps_fire::end, MillePedeFileConverter_cfg::out, and HcalDetIdTransform::transform().
|
staticprivate |
Definition at line 133 of file libminifloat.h.
Referenced by filltables(), float32to16crop(), and float32to16round().
|
staticprivate |
Definition at line 131 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 130 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 132 of file libminifloat.h.
Referenced by filltables(), and float16to32().
|
staticprivate |
Definition at line 134 of file libminifloat.h.
Referenced by filltables(), float32to16crop(), and float32to16round().