Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
std::hash< Mila::Dnn::Compute::DeviceId > Struct Reference

Hash specialization for DeviceId. More...

Public Member Functions

std::size_t operator() (const Mila::Dnn::Compute::DeviceId &id) const noexcept
 Compute hash value for a DeviceId.

Detailed Description

Hash specialization for DeviceId.

Enables use of DeviceId as a key in unordered associative containers (std::unordered_map, std::unordered_set).

Member Function Documentation

◆ operator()()

std::size_t std::hash< Mila::Dnn::Compute::DeviceId >::operator() ( const Mila::Dnn::Compute::DeviceId & id) const
inlinenoexcept

Compute hash value for a DeviceId.

Combines hashes of type and index using a deterministic mixing function.

Parameters
idDeviceId to hash.
Returns
size_t Combined hash value.

The documentation for this struct was generated from the following file: