LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::enum_hash< T > Struct Template Reference

Hash function for enumeration type. More...

#include <hash.hpp>

Public Types

using underlying_t = typename std::conditional< std::is_enum< T >::value, typename std::underlying_type< T >::type, T >::type
 

Public Member Functions

std::size_t operator() (T val) const
 

Detailed Description

template<class T>
struct lbann::enum_hash< T >

Hash function for enumeration type.

Equivalent to std::hash if the input is not an enumeration type.

Definition at line 58 of file hash.hpp.

Member Typedef Documentation

◆ underlying_t

template<class T >
using lbann::enum_hash< T >::underlying_t = typename std::conditional<std::is_enum<T>::value, typename std::underlying_type<T>::type, T>::type

Definition at line 63 of file hash.hpp.

Member Function Documentation

◆ operator()()

template<class T >
std::size_t lbann::enum_hash< T >::operator() ( val) const
inline

Definition at line 64 of file hash.hpp.


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