#define oid_hash uint32_hash /* Remove me eventually */
/* *Combinetwo32-bithashvalues,resultinginanotherhashvalue,with *decentbitmixing. * *Similartoboost'shash_combine().
*/ staticinline uint32
hash_combine(uint32 a, uint32 b)
{
a ^= b + 0x9e3779b9 + (a << 6) + (a >> 2); return a;
}
/* *Combinetwo64-bithashvalues,resultinginanotherhashvalue,usingthe *samekindoftechniqueashash_combine().Testingshowsthatthisalso *producesgoodbitmixing.
*/ staticinline uint64
hash_combine64(uint64 a, uint64 b)
{ /* 0x49a0f4dd15e5a8e3 is 64bit random data */
a ^= b + UINT64CONST(0x49a0f4dd15e5a8e3) + (a << 54) + (a >> 7); return a;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.