hashing

The contents of this module can be included with the header hpx/modules/hashing.hpp. These headers may be used by user-code but are not guaranteed stable (neither header location nor contents). You are using these at your own risk. If you wish to use non-public functionality from a module we strongly suggest only including the module header hpx/modules/hashing.hpp, not the particular header in which the functionality you would like to use is defined. See Public API for a list of names that are part of the public HPX API.

namespace hpx
namespace util

Functions

template<std::uint64_t N>
constexpr std::uint64_t fibhash(std::uint64_t i)
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

Private Members

size_type seed_