ttg
1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
ttg
ttg
util
hash
std
pair.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-3-Clause
2
#ifndef TTG_UTIL_HASH_STD_PAIR_H
3
#define TTG_UTIL_HASH_STD_PAIR_H
4
5
#include "
ttg/util/hash.h
"
6
7
#include <utility>
8
9
namespace
ttg::overload
{
10
11
template
<
typename
T1,
typename
T2>
12
struct
hash
<
std
::pair<T1, T2>,
13
std::enable_if_t<meta::has_ttg_hash_specialization_v<T1> && meta::has_ttg_hash_specialization_v<T2>>> {
14
auto
operator()
(
const
std::pair<T1, T2>& t)
const
{
15
std::size_t seed = 0;
16
hash_combine
(seed, t.first);
17
hash_combine
(seed, t.second);
18
return
seed;
19
}
20
};
21
22
}
// namespace ttg::overload
23
24
#endif
// TTG_UTIL_HASH_PAIR_H
hash.h
std
STL namespace.
ttg::overload
place for overloading/instantiating hash and other functionality
Definition
hash.h:75
ttg::hash_combine
void hash_combine(std::size_t &seed, T const &v)
Definition
hash.h:148
ttg::overload::hash< std::pair< T1, T2 >, std::enable_if_t< meta::has_ttg_hash_specialization_v< T1 > &&meta::has_ttg_hash_specialization_v< T2 > > >::operator()
auto operator()(const std::pair< T1, T2 > &t) const
Definition
pair.h:14
ttg::overload::hash
Computes hash values for objects of type T.
Definition
hash.h:82
Generated at Mon Nov 24 2025 13:41:21 for
ttg
1.0.0 by
1.9.8