Gromacs  2026.0-dev-20241204-d69d709
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
anonymous_namespace{device_management_common.cpp} Namespace Reference

Classes

struct  HashAnArray
 Functor for hashing an array of N bytes. More...
 

Functions

size_t hashCombine (size_t seed, std::byte c)
 Unnecessarily declare the function below, to keep nvcc and clang-tidy happy simultaneously. More...
 

Function Documentation

size_t anonymous_namespace device_management_common anonymous_namespace{device_management_common.cpp}::cpp::hashCombine ( const size_t  seed,
std::byte  c 
)

Unnecessarily declare the function below, to keep nvcc and clang-tidy happy simultaneously.

Combine seed with c to produce a combined hash.

The resulting seed is suitable to pass to a future call to this function.

Implementation is like that of Boost 1.33. It has been superseded in Boost, but its simplicity is enough for this use case. The hexadecimal constant is an arbitrary non-zero value, which avoids producing zero when all inputs were zero.