File: HashFunction.h

package info (click to toggle)
abyss 2.2.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,640 kB
  • sloc: cpp: 109,409; ansic: 6,510; makefile: 2,194; java: 1,354; sh: 732; perl: 672; haskell: 412; python: 45
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