0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros | Functions
TclHash.h File Reference

Implementations of the Tcl hash algorithm by John Ousterhout. More...

#include "Common/String.h"
Include dependency graph for TclHash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Hypertable::TclHash
 Helper structure using overloaded operator() to calculate the Tcl hashes of various input types. More...
 
struct  Hypertable::TclHash2
 Helper structure using overloaded operator() to calculate the Tcl hashes of various input types (using tcl_hash2, the faster implementation). More...
 

Namespaces

 Hypertable
 Hypertable definitions
 

Macros

#define HT_TCLHASH_DO2(p, i)   ret += (ret << 3) + p[i]; ret += (ret << 3) + p[i+1]
 
#define HT_TCLHASH_DO4(p, i)   HT_TCLHASH_DO2(p, i); HT_TCLHASH_DO2(p, i+2);
 
#define HT_TCLHASH_DO8(p, i)   HT_TCLHASH_DO4(p, i); HT_TCLHASH_DO4(p, i+4);
 

Functions

size_t Hypertable::tcl_hash (const char *s)
 The Tcl hash by John Ousterhout for null-terminated c-strings, preferably alpha-numeric characters only. More...
 
size_t Hypertable::tcl_hash (const void *data, size_t len, size_t seed)
 Tcl hash for data with known length. More...
 
size_t Hypertable::tcl_hash2 (const void *data, size_t len, size_t seed)
 Unrolled Tcl hash, up to 20% faster for longer (> 8 bytes) strings. More...
 

Detailed Description

Implementations of the Tcl hash algorithm by John Ousterhout.

Definition in file TclHash.h.