10 #ifndef DISABLE_ABSEIL
15 #pragma warning(disable : 4127)
18 #pragma warning(disable : 4324)
21 #include <absl/container/flat_hash_set.h>
22 #include <absl/container/flat_hash_map.h>
24 #include <absl/container/node_hash_set.h>
25 #include <absl/container/node_hash_map.h>
31 #else // DISABLE_ABSEIL
33 #include <unordered_set>
34 #include <unordered_map>
38 #endif // DISABLE_ABSEIL
40 namespace onnxruntime {
42 #ifndef DISABLE_ABSEIL
49 template <
typename T,
typename Allocator>
51 absl::container_internal::hash_default_hash<T>,
52 absl::container_internal::hash_default_eq<T>,
54 using Base = absl::flat_hash_set<
T,
55 absl::container_internal::hash_default_hash<T>,
56 absl::container_internal::hash_default_eq<T>,
63 template <
typename Key,
typename Value,
66 absl::container_internal::hash_default_hash<Key>,
67 absl::container_internal::hash_default_eq<Key>,
69 using Base = absl::flat_hash_map<Key,
Value,
70 absl::container_internal::hash_default_hash<Key>,
71 absl::container_internal::hash_default_eq<Key>,
82 template <
typename T,
typename Allocator>
84 absl::container_internal::hash_default_hash<T>,
85 absl::container_internal::hash_default_eq<T>,
87 using Base = absl::node_hash_set<
T,
88 absl::container_internal::hash_default_hash<T>,
89 absl::container_internal::hash_default_eq<T>,
96 template <
typename Key,
typename Value,
typename Allocator>
98 absl::container_internal::hash_default_hash<Key>,
99 absl::container_internal::hash_default_eq<Key>,
101 using Base = absl::node_hash_map<Key,
Value,
102 absl::container_internal::hash_default_hash<Key>,
103 absl::container_internal::hash_default_eq<Key>,
110 #else // DISABLE_ABSEIL
112 template <
typename T,
typename Allocator>
117 using Base = std::unordered_set<
T,
126 template <
typename Key,
typename Value,
128 class InlinedHashMap :
public std::unordered_map<Key, Value,
132 using Base = std::unordered_map<Key,
Value,
145 template <
typename T,
typename Allocator>
146 class NodeHashSet :
public std::unordered_set<T,
150 using Base = std::unordered_set<
T,
159 template <
typename Key,
typename Value,
typename Allocator>
160 class NodeHashMap :
public std::unordered_map<Key, Value,
164 using Base = std::unordered_map<Key,
Value,
173 #endif // DISABLE_ABSEIL
A generic, discriminated value, whose type may be queried dynamically.