| 76 | return (y != 1) ? detail::umulhi((uint32_t) x, mul_coeff) >> shift_coeff : x; |
| 77 | } |
| 78 | __host__ __device__ __forceinline__ int32_t mod(int32_t x) const |
| 79 | { |
| 80 | return x - (div(x) * y); |
| 81 | } |
| 82 | __host__ __device__ __forceinline__ void divmod(int32_t x, int32_t& q, int32_t& mod) const |
| 83 | { |
| 84 | q = div(x); |