18#ifndef vtkHashCombiner_h
19#define vtkHashCombiner_h
21#include "vtkCommonCoreModule.h"
25VTK_ABI_NAMESPACE_BEGIN
32 void operator()(T&
h,
typename std::enable_if<
sizeof(T) == 8, std::size_t>::type k)
34 constexpr T m = 0xc6a4a7935bd1e995ull;
51 void operator()(T&
h,
typename std::enable_if<
sizeof(T) == 4, std::size_t>::type k)
53 constexpr std::uint32_t c1 = 0xcc9e2d51;
54 constexpr std::uint32_t c2 = 0x1b873593;
55 constexpr std::uint32_t r1 = 15;
56 constexpr std::uint32_t
r2 = 13;
59 k = (k << r1) | (k >> (32 - r1));
63 h = (
h <<
r2) | (
h >> (32 -
r2));
64 h =
h * 5 + 0xe6546b64;
Combine 4- and 8-byte integers into a single hash value.
void operator()(T &h, typename std::enable_if< sizeof(T)==4, std::size_t >::type k)
Combine an integer k with the 32-bit hash h (which is modified on exit).
void operator()(T &h, typename std::enable_if< sizeof(T)==8, std::size_t >::type k)
Combine an integer k with the 64-bit hash h (which is modified on exit).
Computes the portion of a dataset which is inside a selection.