VTK
9.4.20241218
|
Combine 4- and 8-byte integers into a single hash value. More...
#include <vtkHashCombiner.h>
Public Member Functions | |
template<typename T > | |
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). | |
template<typename T > | |
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). | |
Combine 4- and 8-byte integers into a single hash value.
This templated class accepts one 4- or 8-byte integer and combines it with an existing hash. It is useful for combining hashes of strings with integer values such as connectivity entries for shape primitives.
This class was adapted from (i.e., uses the integer constants from) boost::hash_combine but adds the templating on input value sizes.
Definition at line 27 of file vtkHashCombiner.h.
|
inline |
Combine an integer k with the 64-bit hash h (which is modified on exit).
Definition at line 32 of file vtkHashCombiner.h.
|
inline |
Combine an integer k with the 32-bit hash h (which is modified on exit).
Definition at line 51 of file vtkHashCombiner.h.