The Gaudi Framework  master (d98a2936)
GaudiUtils::GenericHash< T > Struct Template Reference

Generic hash implementation (for easy migration to the new Hash class). More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/Hash.h>

Public Member Functions

std::size_t operator() (const T &key) const
 the generic hash function More...
 

Detailed Description

template<class T>
struct GaudiUtils::GenericHash< T >

Generic hash implementation (for easy migration to the new Hash class).

Definition at line 31 of file Hash.h.

Member Function Documentation

◆ operator()()

template<class T >
std::size_t GaudiUtils::GenericHash< T >::operator() ( const T &  key) const
inline

the generic hash function

Definition at line 33 of file Hash.h.

33  {
34  const char* p = reinterpret_cast<const char*>( &key );
35  return std::accumulate( p, p + sizeof( T ), std::size_t{ 0 },
36  []( std::size_t res, const char& c ) { return ( res << 1 ) ^ c; } );
37  }

The documentation for this struct was generated from the following file:
gaudirun.c
c
Definition: gaudirun.py:525
Gaudi::Accumulators::accumulate
void accumulate(Counter &counter, const Container &container, Fun f=Identity{})
A helper function for accumulating data from a container into a counter This is internally using buff...
Definition: Accumulators.h:1227
ProduceConsume.key
key
Definition: ProduceConsume.py:84