ΒΆtemplate <class DigitsT>
inline std::pair<DigitsT, int16_t> getRounded(
DigitsT Digits,
int16_t Scale,
bool ShouldRound)
template <class DigitsT>
inline std::pair<DigitsT, int16_t> getRounded(
DigitsT Digits,
int16_t Scale,
bool ShouldRound)
Description
Conditionally round up a scaled number. Given \c Digits and \c Scale, round up iff \c ShouldRound is \c true. Always returns \c Scale unless there's an overflow, in which case it returns \c 1+Scale.
Declared at: llvm/include/llvm/Support/ScaledNumber.h:52
Templates
- DigitsT
Parameters
- DigitsT Digits
- int16_t Scale
- bool ShouldRound