MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / parse_eight_digits_unrolled

Function parse_eight_digits_unrolled

Source/external/fast_float.h:742–751  ·  view source on GitHub ↗

credit @aqrit

Source from the content-addressed store, hash-verified

740
741// credit @aqrit
742fastfloat_really_inline FASTFLOAT_CONSTEXPR14
743uint32_t parse_eight_digits_unrolled(uint64_t val) {
744 const uint64_t mask = 0x000000FF000000FF;
745 const uint64_t mul1 = 0x000F424000000064; // 100 + (1000000ULL << 32)
746 const uint64_t mul2 = 0x0000271000000001; // 1 + (10000ULL << 32)
747 val -= 0x3030303030303030;
748 val = (val * 10) + (val >> 8); // val = (val * 2561) >> 8;
749 val = (((val & mask) * mul1) + (((val >> 16) & mask) * mul2)) >> 32;
750 return uint32_t(val);
751}
752
753fastfloat_really_inline FASTFLOAT_CONSTEXPR20
754uint32_t parse_eight_digits_unrolled(const char *chars) noexcept {

Callers 2

fast_float.hFile · 0.85
parse_eight_digitsFunction · 0.85

Calls 1

read_u64Function · 0.85

Tested by

no test coverage detected