You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							93 lines
						
					
					
						
							3.7 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							93 lines
						
					
					
						
							3.7 KiB
						
					
					
				
								#pragma once
							 | 
						|
								
							 | 
						|
								#include <shared_mutex>
							 | 
						|
								
							 | 
						|
								#include <mimalloc.h>
							 | 
						|
								
							 | 
						|
								#include <parallel_hashmap/phmap.h>
							 | 
						|
								
							 | 
						|
								template <class T,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<T>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<T>,
							 | 
						|
								          class Alloc = std::allocator<T>>
							 | 
						|
								using flat_hash_set = phmap::flat_hash_set<T, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class K,
							 | 
						|
								          class V,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<K>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<K>,
							 | 
						|
								          class Alloc = std::allocator<std::pair<const K, V>>>
							 | 
						|
								using flat_hash_map = phmap::flat_hash_map<K, V, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class T,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<T>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<T>,
							 | 
						|
								          class Alloc = std::allocator<T>>
							 | 
						|
								using node_hash_set = phmap::node_hash_set<T, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class K,
							 | 
						|
								          class V,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<K>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<K>,
							 | 
						|
								          class Alloc = std::allocator<std::pair<const K, V>>>
							 | 
						|
								using node_hash_map = phmap::node_hash_map<K, V, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class T,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<T>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<T>,
							 | 
						|
								          class Alloc = std::allocator<T>,
							 | 
						|
								          size_t N    = 4, // 2**N submaps
							 | 
						|
								          class Mutex = std::shared_mutex>
							 | 
						|
								using parallel_flat_hash_set = phmap::parallel_flat_hash_set<T, Hash, Eq, Alloc, N, Mutex>;
							 | 
						|
								
							 | 
						|
								template <class K,
							 | 
						|
								          class V,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<K>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<K>,
							 | 
						|
								          class Alloc = std::allocator<std::pair<const K, V>>,
							 | 
						|
								          size_t N    = 4, // 2**N submaps
							 | 
						|
								          class Mutex = std::shared_mutex>
							 | 
						|
								using parallel_flat_hash_map = phmap::parallel_flat_hash_map<K, V, Hash, Eq, Alloc, N, Mutex>;
							 | 
						|
								
							 | 
						|
								template <class T,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<T>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<T>,
							 | 
						|
								          class Alloc = mi_stl_allocator<T>>
							 | 
						|
								using flat_hash_set_mp = phmap::flat_hash_set<T, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class K,
							 | 
						|
								          class V,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<K>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<K>,
							 | 
						|
								          class Alloc = mi_stl_allocator<std::pair<const K, V>>>
							 | 
						|
								using flat_hash_map_mp = phmap::flat_hash_map<K, V, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class T,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<T>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<T>,
							 | 
						|
								          class Alloc = mi_stl_allocator<T>>
							 | 
						|
								using node_hash_set_mp = phmap::node_hash_set<T, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class K,
							 | 
						|
								          class V,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<K>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<K>,
							 | 
						|
								          class Alloc = mi_stl_allocator<std::pair<const K, V>>>
							 | 
						|
								using node_hash_map_mp = phmap::node_hash_map<K, V, Hash, Eq, Alloc>;
							 | 
						|
								
							 | 
						|
								template <class T,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<T>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<T>,
							 | 
						|
								          class Alloc = mi_stl_allocator<T>,
							 | 
						|
								          size_t N    = 4, // 2**N submaps
							 | 
						|
								          class Mutex = std::shared_mutex>
							 | 
						|
								using parallel_flat_hash_set_mp = phmap::parallel_flat_hash_set<T, Hash, Eq, Alloc, N, Mutex>;
							 | 
						|
								
							 | 
						|
								template <class K,
							 | 
						|
								          class V,
							 | 
						|
								          class Hash  = phmap::priv::hash_default_hash<K>,
							 | 
						|
								          class Eq    = phmap::priv::hash_default_eq<K>,
							 | 
						|
								          class Alloc = mi_stl_allocator<std::pair<const K, V>>,
							 | 
						|
								          size_t N    = 4, // 2**N submaps
							 | 
						|
								          class Mutex = std::shared_mutex>
							 | 
						|
								using parallel_flat_hash_map_mp = phmap::parallel_flat_hash_map<K, V, Hash, Eq, Alloc, N, Mutex>;
							 |