cuda::experimental::stf::hash<::std::pair< T1, T2 > >

Defined in include/cuda/experimental/__stf/utility/hash.cuh

template<class T1, class T2>
struct hash<::std::pair<T1, T2>>

Specialization of hash for std::pair<T1, T2>.

This hash specialization combines the individual hash values of the two elements in the pair to produce a unique hash value for the pair.

Template Parameters
  • T1 – The type of the first element in the pair.

  • T2 – The type of the second element in the pair.

Public Functions

inline size_t operator()(const ::std::pair<T1, T2> &p) const

Computes a hash value for a given std::pair.

This function applies a hash function to each element of the pair and combines these hash values into a single hash value representing the pair.

Parameters

p – The pair to hash.

Returns

size_t The hash value of the tuple.