5#ifndef BITCOIN_UTIL_FASTRANGE_H
6#define BITCOIN_UTIL_FASTRANGE_H
27#ifdef __SIZEOF_INT128__
28 return (
static_cast<unsigned __int128>(x) *
static_cast<unsigned __int128>(n)) >> 64;
static uint64_t FastRange64(uint64_t x, uint64_t n)
Fast range reduction with 64-bit input and 64-bit range.
static uint32_t FastRange32(uint32_t x, uint32_t n)
Fast range reduction with 32-bit input and 32-bit range.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.