File: HashFunction.h

package info (click to toggle)
abyss 2.3.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,284 kB
  • sloc: cpp: 78,182; ansic: 6,512; makefile: 2,252; perl: 672; sh: 509; haskell: 412; python: 4
file content (18 lines) | stat: -rw-r--r-- 368 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef HASHFUNCTION_H
#define HASHFUNCTION_H 1

#include "city.h"
#include <stddef.h>
#include <stdint.h>

static inline uint64_t hashmem(const void *p, size_t n)
{
	return CityHash64(static_cast<const char*>(p), n);
}

static inline uint64_t hashmem(const void *p, size_t n, size_t seed)
{
	return CityHash64WithSeed(static_cast<const char*>(p), n, seed);
}

#endif