Template Function beluga::detail::hash_impl

Function Documentation

template<class T, std::size_t... Ids>
constexpr std::size_t beluga::detail::hash_impl(const T &value, const std::array<double, sizeof...(Ids)> &resolution, std::index_sequence<Ids...> index_sequence)

Hashes a tuple or array of scalar types, using a resolution for each element and using the same amount of bits for them.

Template Parameters:
  • T – Tuple or array of scalar types.

  • ...Ids – Indexes of the array/tuple to be used to calculate the hash.

Parameters:
  • value – The array/tuple to be hashed.

  • resolution – The resolution to be used.

  • index_sequence – Unused, only to allow unpacking ...Ids.

Returns:

The calculated hash.