MCPcopy Create free account
hub / github.com/ablab/spades / hash_value

Function hash_value

ext/src/llvm/APFloat.cpp:3066–3079  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3064}
3065
3066hash_code hash_value(const IEEEFloat &Arg) {
3067 if (!Arg.isFiniteNonZero())
3068 return hash_combine((uint8_t)Arg.category,
3069 // NaN has no sign, fix it at zero.
3070 Arg.isNaN() ? (uint8_t)0 : (uint8_t)Arg.sign,
3071 Arg.semantics->precision);
3072
3073 // Normal floats need their exponent and significand hashed.
3074 return hash_combine((uint8_t)Arg.category, (uint8_t)Arg.sign,
3075 Arg.semantics->precision, Arg.exponent,
3076 hash_combine_range(
3077 Arg.significandParts(),
3078 Arg.significandParts() + Arg.partCount()));
3079}
3080
3081// Conversion from APFloat to/from host float/double. It may eventually be
3082// possible to eliminate these and have everybody deal with APFloats, but that

Callers

nothing calls this directly

Calls 6

hash_combine_rangeFunction · 0.85
significandPartsMethod · 0.80
partCountMethod · 0.80
hash_combineFunction · 0.50
isFiniteNonZeroMethod · 0.45
isNaNMethod · 0.45

Tested by

no test coverage detected