repo.or.cz
/
wdl
/
wdl-ol.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
set base sdk to 10.9
[wdl/wdl-ol.git]
/
WDL
/
fnv64.h
blob
2ddf17c3ed5082a9c35cb860d5abf9b95207aa5e
1
#ifndef _WDL_FNV64_H_
2
#define _WDL_FNV64_H_
3
4
#include
"wdltypes.h"
5
6
#define WDL_FNV64_IV WDL_UINT64_CONST(0xCBF29CE484222325)
7
8
static
WDL_UINT64
WDL_FNV64
(
WDL_UINT64 h
,
const unsigned char
*
data
,
int
sz
)
9
{
10
int
i
;
11
for
(
i
=
0
;
i
<
sz
; ++
i
)
12
{
13
h
*=
WDL_UINT64_CONST
(
0x00000100000001B3
);
14
h
^=
data
[
i
];
15
}
16
return
h
;
17
}
18
#endif