-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
(library | ||
(name Thread_table) | ||
(public_name thread-table)) | ||
|
||
(rule | ||
(targets mix.ml) | ||
(deps mix.64.ml) | ||
(enabled_if %{arch_sixtyfour}) | ||
(action | ||
(progn | ||
(copy mix.64.ml mix.ml)))) | ||
|
||
(rule | ||
(targets mix.ml) | ||
(deps mix.32.ml) | ||
(enabled_if | ||
(not %{arch_sixtyfour})) | ||
(action | ||
(progn | ||
(copy mix.32.ml mix.ml)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(* Mixing function proposed by "TheIronBorn" in a Github issue | ||
https://github.com/skeeto/hash-prospector/issues/19 | ||
in the repository of Hash Prospector by Chris Wellons. | ||
Note that the mixing function was originally designed for 32-bit unsigned | ||
integers. *) | ||
|
||
let[@inline] int x = | ||
let x = x lxor (x lsr 16) in | ||
let x = x * 0x21f0aaad in | ||
let x = x lxor (x lsr 15) in | ||
let x = x * 0x735a2d97 in | ||
x lxor (x lsr 15) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(* Mixing function proposed by Jon Maiga: | ||
https://jonkagstrom.com/mx3/mx3_rev2.html | ||
Note that the mixing function was originally designed for 64-bit unsigned | ||
integers. *) | ||
|
||
let[@inline] int x = | ||
let x = x lxor (x lsr 32) in | ||
let x = x * 0xe9846af9b1a615d in | ||
let x = x lxor (x lsr 32) in | ||
let x = x * 0xe9846af9b1a615d in | ||
x lxor (x lsr 28) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters