1 #ifndef _CONCURRENT_HASH_MAP_HH_
2 #define _CONCURRENT_HASH_MAP_HH_
6 #include <tbb/concurrent_hash_map.h>
23 equal(
const Key& k1,
const Key& k2)
25 return EqualKey()(k1,k2);
37 typedef tbb::mutex mutex;
38 typedef tbb::concurrent_hash_map<Key,Data,hash_compare> internal_hash_map;
39 typedef typename internal_hash_map::iterator iterator;
40 typedef typename internal_hash_map::const_iterator const_iterator;
41 typedef typename internal_hash_map::size_type size_type;
42 typedef typename internal_hash_map::accessor accessor;
43 typedef typename internal_hash_map::const_accessor const_accessor;
46 internal_hash_map map_;
97 mutex::scoped_lock lock(map_mutex_);
102 find( const_accessor& result,
const Key& key)
const
104 return map_.find(result,key);
108 find( accessor& result,
const Key& key)
110 return map_.find(result,key);
114 insert( const_accessor& result,
const Key& key)
116 return map_.insert(result,key);
120 insert( accessor& result,
const Key& key)
122 return map_.insert(result,key);
126 erase(
const Key& key)
128 return map_.erase(key);
Definition: hash_support.hh:51
Definition: hash_support.hh:40