27 #ifndef BLANK_MAP_API_H
28 #define BLANK_MAP_API_H
31 #include "/Libraries/nbds.0.4.3/include/common.h"
32 #include "/Libraries/nbds.0.4.3/include/nstring.h"
33 #include "/Libraries/nbds.0.4.3/include/runtime.h"
34 #include "/Libraries/nbds.0.4.3/include/map.h"
35 #include "/Libraries/nbds.0.4.3/include/rcu.h"
36 #include "/Libraries/nbds.0.4.3/include/list.h"
37 #include "/Libraries/nbds.0.4.3/include/skiplist.h"
38 #include "/Libraries/nbds.0.4.3/include/hashtable.h"
41 template<
class Key,
class Value>
45 container = map_alloc(&MAP_IMPL_HT, NULL);
57 map_key_t temp = (map_key_t) key;
59 map_val_t temp2 = map_get(
container, temp);
69 map_val_t temp = map_add(
container, (map_key_t) key, (map_val_t) value);
78 map_val_t temp = map_cas(
container, (map_key_t) key,
79 (map_val_t) value_expected, (map_val_t) value_new);
80 if (temp == value_expected) {
83 value_expected =
false;
88 bool remove(Key key) {
89 map_val_t temp = map_remove(
container, (map_key_t) key);
void detach_thread()
Definition: cliff_api.h:54
bool insert(Key key, Value value)
Definition: cliff_api.h:68
map_t * container
Definition: cliff_api.h:102
void attach_thread()
Definition: cliff_api.h:52
bool update(Key key, Value &value_expected, Value value_new)
Definition: cliff_api.h:77
uint64_t Value
Definition: testObject.h:59
size_t size()
Definition: cliff_api.h:97
bool find(Key key, Value &value)
Definition: cliff_api.h:56
Definition: blank_api.h:31
TestClass(size_t num_threads, size_t capacity)
Definition: cliff_api.h:44
std::string toString()
Definition: cliff_api.h:48