Go to the source code of this file.
Data Structures | |
struct | tagtest |
Macros | |
#define | HASH_LITTLE_ENDIAN 0 |
#define | HASH_BIG_ENDIAN 0 |
#define | rot(x, k) (((x)<<(k)) | ((x)>>(32-(k)))) |
#define | mix(a, b, c) |
#define | final(a, b, c) |
#define | CRC32POLYNOMIAL 0x04c11db7L |
#define | get16bits(d) |
#define | BUFF_SZ (128*2) |
#define | NTESTS 5000000 |
Typedefs | |
typedef uint32_t(* | hashFn) (const char *s, int len) |
Functions | |
uint32_t | hashword (const uint32_t *k, size_t length, uint32_t initval) |
void | hashword2 (const uint32_t *k, size_t length, uint32_t *pc, uint32_t *pb) |
uint32_t | hashlittle (const void *key, size_t length, uint32_t initval) |
void | hashlittle2 (const void *key, size_t length, uint32_t *pc, uint32_t *pb) |
uint32_t | hashbig (const void *key, size_t length, uint32_t initval) |
uint32_t | hashLookup3Orig (const char *k, int length) |
uint32_t | hashLookup3 (const char *k, int length) |
static uint32_t | GetCRC16Update (uint32_t start_crc, const char *data_stream, int length) |
uint32_t | GetCRC16 (const char *data_stream, int length) |
static void | GenerateCRC32Table (void) |
static uint32_t | UpdateCRC32 (uint32_t crc_accum, const char *data_blk_ptr, int data_blk_size) |
uint32_t | GetCRC32 (const char *data_stream, int length) |
uint32_t | GetCRC32PH (const char *data_blk_ptr, int data_blk_size) |
uint32_t | FNVHash (const char *data, int len) |
uint32_t | oneAtATimeHash (const char *s, int len) |
uint32_t | oneAtATimeHashPH (const char *s, int len) |
uint32_t | SuperFastHash (const char *data, int len) |
uint32_t | alphaNumHash (const char *s, int len) |
uint32_t | bernstein (const char *s, int len) |
uint32_t | stroustrup (const char *s, int len) |
double | test (hashFn hash) |
int | main () |
Variables | |
static uint32_t | crc_16_table [16] |
static uint32_t | crc_table [256] |
struct tagtest | tests [] |
#define HASH_LITTLE_ENDIAN 0 |
Definition at line 77 of file Test-HashingSpeed.C.
#define HASH_BIG_ENDIAN 0 |
Definition at line 78 of file Test-HashingSpeed.C.
Definition at line 81 of file Test-HashingSpeed.C.
#define mix | ( | a, | |
b, | |||
c | |||
) |
#define final | ( | a, | |
b, | |||
c | |||
) |
#define CRC32POLYNOMIAL 0x04c11db7L |
Definition at line 796 of file Test-HashingSpeed.C.
#define get16bits | ( | d | ) |
Definition at line 938 of file Test-HashingSpeed.C.
#define BUFF_SZ (128*2) |
Definition at line 1033 of file Test-HashingSpeed.C.
#define NTESTS 5000000 |
Definition at line 1034 of file Test-HashingSpeed.C.
typedef uint32_t(* hashFn) (const char *s, int len) |
Definition at line 1031 of file Test-HashingSpeed.C.
uint32_t hashword | ( | const uint32_t * | k, |
size_t | length, | ||
uint32_t | initval | ||
) |
Definition at line 186 of file Test-HashingSpeed.C.
References Foam::constant::physicoChemical::b, Foam::constant::universal::c, k, and mix.
void hashword2 | ( | const uint32_t * | k, |
size_t | length, | ||
uint32_t * | pc, | ||
uint32_t * | pb | ||
) |
Definition at line 230 of file Test-HashingSpeed.C.
References Foam::constant::physicoChemical::b, Foam::constant::universal::c, k, and mix.
uint32_t hashlittle | ( | const void * | key, |
size_t | length, | ||
uint32_t | initval | ||
) |
Definition at line 295 of file Test-HashingSpeed.C.
References Foam::constant::physicoChemical::b, Foam::constant::universal::c, HASH_LITTLE_ENDIAN, k, and mix.
Referenced by hashLookup3Orig().
void hashlittle2 | ( | const void * | key, |
size_t | length, | ||
uint32_t * | pc, | ||
uint32_t * | pb | ||
) |
Definition at line 447 of file Test-HashingSpeed.C.
References Foam::constant::physicoChemical::b, Foam::constant::universal::c, HASH_LITTLE_ENDIAN, k, and mix.
uint32_t hashbig | ( | const void * | key, |
size_t | length, | ||
uint32_t | initval | ||
) |
Definition at line 598 of file Test-HashingSpeed.C.
References Foam::constant::physicoChemical::b, Foam::constant::universal::c, HASH_BIG_ENDIAN, k, and mix.
uint32_t hashLookup3Orig | ( | const char * | k, |
int | length | ||
) |
Definition at line 690 of file Test-HashingSpeed.C.
References hashlittle(), and k.
uint32_t hashLookup3 | ( | const char * | k, |
int | length | ||
) |
Definition at line 694 of file Test-HashingSpeed.C.
References Foam::Hasher(), and k.
|
static |
Definition at line 719 of file Test-HashingSpeed.C.
References crc_16_table.
Referenced by GetCRC16().
uint32_t GetCRC16 | ( | const char * | data_stream, |
int | length | ||
) |
Definition at line 747 of file Test-HashingSpeed.C.
References GetCRC16Update().
|
static |
Definition at line 798 of file Test-HashingSpeed.C.
References CRC32POLYNOMIAL, and crc_table.
Referenced by main().
|
static |
Definition at line 819 of file Test-HashingSpeed.C.
References crc_table.
Referenced by GetCRC32().
uint32_t GetCRC32 | ( | const char * | data_stream, |
int | length | ||
) |
Definition at line 834 of file Test-HashingSpeed.C.
References UpdateCRC32().
uint32_t GetCRC32PH | ( | const char * | data_blk_ptr, |
int | data_blk_size | ||
) |
Definition at line 843 of file Test-HashingSpeed.C.
References crc_table.
uint32_t FNVHash | ( | const char * | data, |
int | len | ||
) |
Definition at line 864 of file Test-HashingSpeed.C.
uint32_t oneAtATimeHash | ( | const char * | s, |
int | len | ||
) |
Definition at line 881 of file Test-HashingSpeed.C.
References s().
uint32_t oneAtATimeHashPH | ( | const char * | s, |
int | len | ||
) |
Definition at line 898 of file Test-HashingSpeed.C.
References s().
uint32_t SuperFastHash | ( | const char * | data, |
int | len | ||
) |
Definition at line 942 of file Test-HashingSpeed.C.
References get16bits.
uint32_t alphaNumHash | ( | const char * | s, |
int | len | ||
) |
Definition at line 995 of file Test-HashingSpeed.C.
References Foam::constant::universal::h, and s().
uint32_t bernstein | ( | const char * | s, |
int | len | ||
) |
Definition at line 1005 of file Test-HashingSpeed.C.
References Foam::constant::universal::h, and s().
uint32_t stroustrup | ( | const char * | s, |
int | len | ||
) |
Definition at line 1017 of file Test-HashingSpeed.C.
References Foam::constant::universal::h, and s().
double test | ( | hashFn | hash | ) |
Definition at line 1036 of file Test-HashingSpeed.C.
References BUFF_SZ, Foam::constant::physicoChemical::c1, and NTESTS.
Referenced by rotorDiskSource::createCoordinateSystem(), and main().
int main | ( | ) |
Definition at line 1066 of file Test-HashingSpeed.C.
References GenerateCRC32Table(), Foam::name(), tagtest::name, tagtest::res, test(), and tests.
|
static |
Definition at line 702 of file Test-HashingSpeed.C.
Referenced by GetCRC16Update().
|
static |
Definition at line 753 of file Test-HashingSpeed.C.
Referenced by GenerateCRC32Table(), GetCRC32PH(), and UpdateCRC32().
struct tagtest tests[] |
Referenced by main().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.