Fast range reduction with 32-bit input and 32-bit range. */
| 17 | |
| 18 | /** Fast range reduction with 32-bit input and 32-bit range. */ |
| 19 | static inline uint32_t FastRange32(uint32_t x, uint32_t n) |
| 20 | { |
| 21 | return (uint64_t{x} * n) >> 32; |
| 22 | } |
| 23 | |
| 24 | /** Fast range reduction with 64-bit input and 64-bit range. */ |
| 25 | static inline uint64_t FastRange64(uint64_t x, uint64_t n) |
no outgoing calls
no test coverage detected