-
Notifications
You must be signed in to change notification settings - Fork 12
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
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/CompiledPerfectHashTable/CompiledPerfectHashTableChm01IndexDummyAnd.c
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,25 @@ | ||
|
||
DECLARE_INDEX_ROUTINE() | ||
{ | ||
CPHINDEX Index; | ||
CPHDKEY Vertex1; | ||
CPHDKEY Vertex2; | ||
CPHDKEY MaskedLow; | ||
CPHDKEY MaskedHigh; | ||
CPHDKEY DownsizedKey; | ||
|
||
DownsizedKey = DOWNSIZE_KEY(Key); | ||
Vertex1 = _mm_crc32_u32(SEED1, DownsizedKey); | ||
Vertex2 = _mm_crc32_u32(SEED2, _rotl(DownsizedKey, (BYTE)(SEED3 & 0x1f))); | ||
|
||
MaskedLow = Vertex1 & HASH_MASK; | ||
MaskedHigh = Vertex2 & HASH_MASK; | ||
|
||
Vertex1 = TABLE_DATA[MaskedLow]; | ||
Vertex2 = TABLE_DATA[MaskedHigh]; | ||
|
||
Index = (CPHINDEX)((Vertex1 + Vertex2) & INDEX_MASK); | ||
|
||
return Index; | ||
} | ||
|
55 changes: 55 additions & 0 deletions
55
src/PerfectHash/CompiledPerfectHashTableChm01IndexDummyAnd_CSource_RawCString.h
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,55 @@ | ||
// | ||
// Auto-generated. | ||
// | ||
|
||
DECLSPEC_ALIGN(16) | ||
const CHAR CompiledPerfectHashTableChm01IndexDummyAndCSourceRawCStr[] = | ||
"\n" | ||
"//\n" | ||
"// Begin CompiledPerfectHashTableChm01IndexDummyAnd.c.\n" | ||
"//\n" | ||
"\n" | ||
"\n" | ||
"DECLARE_INDEX_ROUTINE()\n" | ||
"{\n" | ||
" CPHINDEX Index;\n" | ||
" CPHDKEY Vertex1;\n" | ||
" CPHDKEY Vertex2;\n" | ||
" CPHDKEY MaskedLow;\n" | ||
" CPHDKEY MaskedHigh;\n" | ||
" CPHDKEY DownsizedKey;\n" | ||
"\n" | ||
" DownsizedKey = DOWNSIZE_KEY(Key);\n" | ||
" Vertex1 = _mm_crc32_u32(SEED1, DownsizedKey);\n" | ||
" Vertex2 = _mm_crc32_u32(SEED2, _rotl(DownsizedKey, (BYTE)(SEED3 & 0x1f)));\n" | ||
"\n" | ||
" MaskedLow = Vertex1 & HASH_MASK;\n" | ||
" MaskedHigh = Vertex2 & HASH_MASK;\n" | ||
"\n" | ||
" Vertex1 = TABLE_DATA[MaskedLow];\n" | ||
" Vertex2 = TABLE_DATA[MaskedHigh];\n" | ||
"\n" | ||
" Index = (CPHINDEX)((Vertex1 + Vertex2) & INDEX_MASK);\n" | ||
"\n" | ||
" return Index;\n" | ||
"}\n" | ||
"\n" | ||
"\n" | ||
"//\n" | ||
"// End CompiledPerfectHashTableChm01IndexDummyAnd.c.\n" | ||
"//\n" | ||
"\n" | ||
; | ||
|
||
const STRING CompiledPerfectHashTableChm01IndexDummyAndCSourceRawCString = { | ||
sizeof(CompiledPerfectHashTableChm01IndexDummyAndCSourceRawCStr) - sizeof(CHAR), | ||
sizeof(CompiledPerfectHashTableChm01IndexDummyAndCSourceRawCStr), | ||
#ifdef _WIN64 | ||
0, | ||
#endif | ||
(PCHAR)&CompiledPerfectHashTableChm01IndexDummyAndCSourceRawCStr, | ||
}; | ||
|
||
#ifndef RawCString | ||
#define RawCString (&CompiledPerfectHashTableChm01IndexDummyAndCSourceRawCString) | ||
#endif |