hpx/hashing/jenkins_hash.hpp
See Public API for a list of names and headers that are part of the public
HPX API.
-
namespace
hpx
-
namespace
util
-
class
jenkins_hash
- #include <jenkins_hash.hpp>
The jenkins_hash class encapsulates a hash calculation function published by Bob Jenkins here: http://burtleburtle.net/bob/hash
Public Types
-
enum
seedenum
The seedenum is used as a dummy parameter to distinguish the different constructors
Values:
-
seed
= 1
-
typedef std::uint32_t
size_type
this is the type representing the result of this hash
Public Functions
-
jenkins_hash
()
constructors and destructor
-
jenkins_hash
(size_type size)
-
jenkins_hash
(size_type seedval, seedenum)
-
~jenkins_hash
()
-
size_type
operator()
(std::string const &key) const
calculate the hash value for the given key
-
size_type
operator()
(char const *key) const
-
bool
reset
(size_type size)
re-seed the hash generator
-
void
set_seed
(size_type seedval)
initialize the hash generator to a specific seed
-
void
swap
(jenkins_hash &rhs)
support for std::swap
Protected Functions
-
size_type
hash
(const char *k, std::size_t length) const