5#ifndef GINAC_HASH_SEED_H
6#define GINAC_HASH_SEED_H
12#define GINAC_HASH_USE_MANGLED_NAME 1
15#ifdef GINAC_HASH_USE_MANGLED_NAME
35#ifndef GINAC_HASH_USE_MANGLED_NAME
40 const void* mangled_name_ptr = (
const void*)tinfo.name();
47 const char* mangled_name = tinfo.name();
48 return crc32(mangled_name, std::strlen(mangled_name), 0);
unsigned golden_ratio_hash(uintptr_t n)
Truncated multiplication with golden ratio, for computing hash values.
static unsigned make_hash_seed(const std::type_info &tinfo)
We need a hash function which gives different values for objects of different types.
static unsigned crc32(const char *c, const unsigned len, const unsigned crcinit)
Interface to several small and furry utilities needed within GiNaC but not of any interest to the use...