27 #ifndef WF_HASHMAP_API_H_
28 #define WF_HASHMAP_API_H_
38 #ifndef HASHMAP_EXPANSION_RATE
39 #define HASHMAP_EXPANSION_RATE 3
42 template<
class Key,
class Value>
69 value = *(va.
value());
82 std::atomic<Value> *temp =
reinterpret_cast<std::atomic<Value> *
>(va.
value());
83 return temp->compare_exchange_strong(value_expected, value_new);
88 bool remove(Key key) {
102 #endif // WF_HASHMAP_API_H_
This class is used to safe guard access to values.
Definition: wf_hash_map.h:159
void detach_thread()
Definition: wf_hashmap_api.h:63
Thread local information.
Definition: thread_context.h:62
bool insert(Key key, Value value)
Definition: wf_hashmap_api.h:74
map_t * container
Definition: cliff_api.h:102
Map * container
Definition: wf_hashmap_api.h:99
tervel::containers::wf::HashMap< Key, Value >::ValueAccessor Accessor
Definition: wf_hashmap_api.h:46
Value * value()
Definition: wf_hash_map.h:173
void attach_thread()
Definition: blank_api.h:40
#define HASHMAP_EXPANSION_RATE
Definition: wf_hashmap_api.h:39
bool update(Key key, Value &value_expected, Value value_new)
Definition: wf_hashmap_api.h:79
uint64_t Value
Definition: testObject.h:59
Contains shared information that should be accessible by all threads.
Definition: tervel.h:39
size_t size()
Definition: wf_hashmap_api.h:93
bool find(Key key, Value &value)
Definition: wf_hashmap_api.h:65
Definition: blank_api.h:31
TestClass(size_t num_threads, size_t capacity)
Definition: wf_hashmap_api.h:48
A wait-free hash map implementation.
Definition: wf_hash_map.h:75
tervel::containers::wf::HashMap< Key, Value > Map
Definition: wf_hashmap_api.h:45
tervel::Tervel * tervel_obj
Definition: wf_hashmap_api.h:98
std::string toString()
Definition: wf_hashmap_api.h:54