ATLAS Offline Software
Static Public Member Functions | List of all members
AlgorithmIdentifierHashCompare Class Reference

Static hash and equal members as required by tbb::concurrent_hash_map. More...

#include <AlgorithmIdentifier.h>

Collaboration diagram for AlgorithmIdentifierHashCompare:

Static Public Member Functions

static size_t hash (const AlgorithmIdentifier &ai)
 Hash function for AlgorithmIdentifier to assign bucket in hash map. More...
 
static bool equal (const AlgorithmIdentifier &x, const AlgorithmIdentifier &y)
 Equality function for AlgorithmIdentifier to check for uniqueness within hash bucket. More...
 

Detailed Description

Static hash and equal members as required by tbb::concurrent_hash_map.

Definition at line 60 of file AlgorithmIdentifier.h.

Member Function Documentation

◆ equal()

bool AlgorithmIdentifierHashCompare::equal ( const AlgorithmIdentifier x,
const AlgorithmIdentifier y 
)
inlinestatic

Equality function for AlgorithmIdentifier to check for uniqueness within hash bucket.

Parameters
[in]xFirst AlgorithmIdentifier to check equality of
[in]ySecond AlgorithmIdentifier to check equality of
Returns
True if both the algorithm name and algorithm store strings are identical

Definition at line 81 of file AlgorithmIdentifier.h.

81  {
82  return (x.m_caller == y.m_caller && x.m_store == y.m_store && x.m_realSlot == y.m_realSlot);
83 }

◆ hash()

size_t AlgorithmIdentifierHashCompare::hash ( const AlgorithmIdentifier ai)
inlinestatic

Hash function for AlgorithmIdentifier to assign bucket in hash map.

Parameters
[in]aiAlgorithmIdentifier to calculate hash for
Returns
Cached std::hash<std::string> of algorithm name combined with algorithm store

Definition at line 77 of file AlgorithmIdentifier.h.

77  {
78  return ai.m_hash;
79 }

The documentation for this class was generated from the following file:
x
#define x
AlgorithmIdentifier::m_hash
size_t m_hash
Hash of algorithm + store + realSlot.
Definition: AlgorithmIdentifier.h:36
y
#define y