/* *Mixingscores(inbits)for(7,20): *Inputdelta:1-bit2-bit *1round:330.39201.6 *2rounds:1246.425475.4 *3rounds:1907.131295.1 *4rounds:2042.331718.6 *Perfect:204831744 *(32*64)(32*31/2*64)
*/ #define HASH_MIX(x, y, a) \
( x ^= (a), \
y ^= x, x = rol32(x, 7),\
x += y, y = rol32(y,20),\
y *= 9 )
staticinlineunsignedint fold_hash(unsignedlong x, unsignedlong y)
{ /* Use arch-optimized multiply if one exists */ return __hash_32(y ^ __hash_32(x));
}
/* *Generateahash.Thisisderivedfromfull_name_hash(),butwewanttobe *sureitisarchindependentandthatitdoesn'tchangeasbitsofthe *computedhashvaluemightappearondisk.Thecallermustguaranteethat *thesourcedataisamultipleoffourbytesinsize.
*/ unsignedint fscache_hash(unsignedint salt, constvoid *data, size_t len)
{ const __le32 *p = data; unsignedint a, x = 0, y = salt, n = len / sizeof(__le32);
for (; n; n--) {
a = le32_to_cpu(*p++);
HASH_MIX(x, y, a);
} return fold_hash(x, y);
}
/* *initialisethefscachingmodule
*/ int __init fscache_init(void)
{ int ret = -ENOMEM;
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.