19 #ifndef _PASL_DATA_ANNOTATION_H_
20 #define _PASL_DATA_ANNOTATION_H_
25 namespace annotation {
33 PARENT_POINTER_BOOTSTRAP_INTERIOR_NODE=0,
34 PARENT_POINTER_BOOTSTRAP_LAYER_NODE=1,
35 PARENT_POINTER_CHUNK=2,
36 PARENT_POINTER_UNINITIALIZED=3
39 template <
class Measured>
47 mutable void* parent_ptr;
48 mutable Measured prefix;
60 template <
class Po
inter>
62 return tagged::extract_value<Pointer, void*>(parent_ptr);
66 long t = tagged::extract_tag<void*, void*>(parent_ptr);
67 if (t == PARENT_POINTER_BOOTSTRAP_INTERIOR_NODE)
68 return PARENT_POINTER_BOOTSTRAP_INTERIOR_NODE;
69 else if (t == PARENT_POINTER_BOOTSTRAP_LAYER_NODE)
70 return PARENT_POINTER_BOOTSTRAP_LAYER_NODE;
71 else if (t == PARENT_POINTER_UNINITIALIZED)
72 return PARENT_POINTER_UNINITIALIZED;
75 return PARENT_POINTER_UNINITIALIZED;
83 template <
class Measured1>
88 template <
class Po
inter>
90 parent_ptr = tagged::create<Pointer, void*>(p, t);
98 template <
class Measured1>
104 std::swap(parent_ptr, other.parent_ptr);
105 std::swap(depth, other.depth);
106 std::swap(prefix, other.prefix);
118 template <
class Po
inter>
124 return PARENT_POINTER_UNINITIALIZED;
131 template <
class Measured>
136 template <
class Po
inter>
144 template <
class Measured>
173 : next(nullptr), prev(nullptr) { }
175 template <
class Po
inter>
177 return (Pointer)next;
180 template <
class Po
inter>
182 return (Pointer)prev;
185 template <
class Po
inter>
191 template <
class Po
inter>
193 assert(l1.
get_next<
void*>() == (
void*)p2);
194 assert((
void*)p1 == l2.
get_prev<
void*>());
200 std::swap(next, other.next);
201 std::swap(prev, other.prev);
213 template <
class Po
inter>
218 template <
class Po
inter>
223 template <
class Po
inter>
227 template <
class Po
inter>
247 template <
class Measured>
252 template <
class Measured>
271 template <
class Measured,
class Swap_measured=std_swap>
282 template <
class Measured1>
287 template <
class Measured1>
293 Swap_measured::swap(cached, other.
cached);
302 class Measured=without_measured,
303 class Parent_pointer=without_parent_pointer,
304 class Sibling_pointer=without_chain
320 prefix.swap(other.
prefix);
321 parent.swap(other.
parent);
Measured1 get_cached() const
Measured1 get_prefix() const
void swap(self_type &other)
void swap(self_type &other)
parent_pointer_tag get_tag() const
enum{PARENT_POINTER_BOOTSTRAP_INTERIOR_NODE=0, PARENT_POINTER_BOOTSTRAP_LAYER_NODE=1, PARENT_POINTER_CHUNK=2, PARENT_POINTER_UNINITIALIZED=3} parent_pointer_tag
static constexpr bool enabled
void set_cached(Measured1 m) const
void swap(self_type &other)
static constexpr bool enabled
static constexpr bool enabled
Measured cached_prefix_type
static constexpr bool enabled
Pointer get_pointer() const
void swap(self_type &other)
static void unlink(self_type &l1, self_type &l2, Pointer p1, Pointer p2)
Measured get_cached() const
static void link(self_type &l1, self_type &l2, Pointer p1, Pointer p2)
static void swap(T &x, T &y)
Parent_pointer parent_pointer_type
static constexpr bool enabled
static void link(self_type &l1, self_type &l2, Pointer p1, Pointer p2)
void swap(self_type &other)
static constexpr bool finger_search_enabled
void set_pointer(Pointer, parent_pointer_tag) const
Measured get_prefix() const
void set_cached(Measured m) const
void swap(self_type &other)
parent_pointer_tag get_tag() const
void set_prefix(Measured1 m) const
void set_depth(int d) const
Pointer get_pointer() const
void set_prefix(Measured) const
void set_pointer(Pointer p, parent_pointer_tag t) const
static void unlink(self_type &l1, self_type &l2, Pointer p1, Pointer p2)
static constexpr bool enabled
void set_depth(int) const