commit | b87817871b615af960c2d84e35d41b88602c4186 | [log] [tgz] |
---|---|---|
author | Connor Abbott <cwabbott0@gmail.com> | Fri Mar 29 15:08:17 2019 +0100 |
committer | Connor Abbott <cwabbott0@gmail.com> | Fri May 31 19:14:27 2019 +0200 |
tree | 519a15d65aada0f193a5bcdbc1adfe2d6b4817df | |
parent | 983b001c77c6c9e9aa436c3252fafe34edfe6738 [diff] |
util: Add a helper for faster remainders This should be at least as fast as using fast_idiv_by_const, and has the advantage that the precomputation is simple enough to be evaluated at Mesa-compile time for hash tables and sets which have a fixed table of possible divisors. Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Jason Ekstrand <jason@jlekstrand.net>