Skip to content

Commit

Permalink
Add missing files.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpn committed Feb 17, 2020
1 parent 937a589 commit d4c92f3
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
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;
}

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

0 comments on commit d4c92f3

Please sign in to comment.