BloombergLP::bdlb::HashUtil::hash0

hash0 overloads

Synopses

Declared in <bdlb_hashutil.h>

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    bsls::Types::Int64 key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    bsls::Types::Uint64 key,
    int modulus);
» more...

Return a modular hash value for the specified key.

static
unsigned int
hash0(
    char key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    double key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    float key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    int key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    long key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    short key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    signed char key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    unsigned char key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    unsigned int key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    unsigned long key,
    int modulus);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash0(
    unsigned short key,
    int modulus);
» more...

Return a modular hash value for the specified null-terminated string.

static
unsigned int
hash0(
    char const* string,
    int modulus);
» more...

Same as the preceding overload for the specified pointer key.

static
unsigned int
hash0(
    void const* key,
    int modulus);
» more...

Return a modular hash value for the specified string of the specified stringLength.

static
unsigned int
hash0(
    char const* string,
    int stringLength,
    int modulus);
» more...

Return Value

  • modular hash value for key in [0 .. modulus)]
  • modular hash value for string in [0 .. modulus)]

Parameters

NameDescription
keyvalue to hash
moduluspositive upper bound (exclusive) of the hash range
stringnull-terminated string to hash
stringLengthlength of string in bytes