a24_aFnv
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
* aFnv
-(by [[K]], 2024.09.09)
** (1) ver.1.00 [2024.09.09] (19行)
AStatic uint32_t aFnv32(const void *p, AInt l)
{
const unsigned char *q = (const unsigned char *) p;
uint32_t h = 0x811c9dc5;
AInt i;
for (i = 0; i < l; i++)
h = (h * 0x01000193) ^ q[i];
return h;
}
AStatic uint64_t aFnv64(const void *p, AInt l)
{
const unsigned char *q = (const unsigned char *) p;
uint64_t h = 0xcbf29ce484222325ULL;
AInt i;
for (i = 0; i < l; i++)
h = (h * 0x00000100000001b3ULL) ^ q[i];
return h;
}
-https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%...
終了行:
* aFnv
-(by [[K]], 2024.09.09)
** (1) ver.1.00 [2024.09.09] (19行)
AStatic uint32_t aFnv32(const void *p, AInt l)
{
const unsigned char *q = (const unsigned char *) p;
uint32_t h = 0x811c9dc5;
AInt i;
for (i = 0; i < l; i++)
h = (h * 0x01000193) ^ q[i];
return h;
}
AStatic uint64_t aFnv64(const void *p, AInt l)
{
const unsigned char *q = (const unsigned char *) p;
uint64_t h = 0xcbf29ce484222325ULL;
AInt i;
for (i = 0; i < l; i++)
h = (h * 0x00000100000001b3ULL) ^ q[i];
return h;
}
-https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%...
ページ名: