Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
FWCore
Utilities
interface
hash_combine.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_hash_combine_h
2
#define FWCore_Utilities_hash_combine_h
3
// -*- C++ -*-
4
//
5
// Package: FWCore/Utilities
6
// Class : hash_combine
7
//
20
// system include files
21
#include <functional>
22
23
namespace
edm {
24
template
<
typename
T>
25
inline
void
hash_combine
(std::size_t&
seed
,
const
T
&
val
) {
26
seed ^= std::hash<T>()(val) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
27
}
28
29
template
<
typename
T
,
typename
... Types>
30
inline
void
hash_combine
(std::size_t&
seed
,
const
T
&
val
,
const
Types&...
args
) {
31
hash_combine
(seed, val);
32
hash_combine
(seed, args...);
33
}
34
35
template
<
typename
... Types>
36
inline
std::size_t
hash_value
(
const
Types&...
args
) {
37
std::size_t
seed
{0};
38
hash_combine
(
seed
, args...);
39
return
seed
;
40
}
41
42
}
// namespace edm
43
#endif
writedatasetfile.args
tuple args
Definition:
writedatasetfile.py:18
hgcalPerformanceValidation.val
tuple val
Definition:
hgcalPerformanceValidation.py:393
edm::hash_value
std::size_t hash_value(const Types &...args)
Definition:
hash_combine.h:36
edm::hash_combine
void hash_combine(std::size_t &seed, const T &val)
Definition:
hash_combine.h:25
fileCollector.seed
tuple seed
Definition:
fileCollector.py:127
T
long double T
Definition:
Basic3DVectorLD.h:48
Generated for CMSSW Reference Manual by
1.8.5