diff options
author | YRabbit <rabbit@yrabbit.cyou> | 2022-02-04 09:03:36 +1000 |
---|---|---|
committer | YRabbit <rabbit@yrabbit.cyou> | 2022-02-04 09:03:36 +1000 |
commit | eb5d3b3197b18b9bc3990dac85faee63f17f3f16 (patch) | |
tree | 71bb36fd895b888c1a01ea044b3ad4587d07ce9d /common/hashlib.h | |
parent | 604260a0d7344627cea82198512384319c705105 (diff) | |
parent | 5007cd3603d71f10924bb97acfe42d50d2ebcbd4 (diff) | |
download | nextpnr-eb5d3b3197b18b9bc3990dac85faee63f17f3f16.tar.gz nextpnr-eb5d3b3197b18b9bc3990dac85faee63f17f3f16.tar.bz2 nextpnr-eb5d3b3197b18b9bc3990dac85faee63f17f3f16.zip |
Merge branch 'master' into diff-locations
Diffstat (limited to 'common/hashlib.h')
-rw-r--r-- | common/hashlib.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/common/hashlib.h b/common/hashlib.h index 70de8c91..2f7357e2 100644 --- a/common/hashlib.h +++ b/common/hashlib.h @@ -28,9 +28,7 @@ const int hashtable_size_factor = 3; // Cantor pairing function for two non-negative integers // https://en.wikipedia.org/wiki/Pairing_function -inline unsigned int mkhash(unsigned int a, unsigned int b) { - return (a*a + 3*a + 2*a*b + b + b*b) / 2; -} +inline unsigned int mkhash(unsigned int a, unsigned int b) { return (a * a + 3 * a + 2 * a * b + b + b * b) / 2; } // traditionally 5381 is used as starting value for the djb2 hash const unsigned int mkhash_init = 5381; |