tbb::interface10::internal::skip_list_node< Value, Mutex > Class Template Reference

`#include <_concurrent_skip_list_impl.h>`

Collaboration diagram for tbb::interface10::internal::skip_list_node< Value, Mutex >:

## Public Types

using | value_type = Value
using | size_type = std::size_t
using | reference = value_type &
using | const_reference = const value_type &
using | pointer = value_type *
using | const_pointer = const value_type *
using | node_pointer = skip_list_node *
using | atomic_node_pointer = std::atomic< node_pointer >
using | mutex_type = Mutex
using | lock_type = std::unique_lock< mutex_type >

## Public Member Functions

| skip_list_node (size_type levels)
| ~skip_list_node ()
| skip_list_node (const skip_list_node &)=delete
| skip_list_node (skip_list_node &&)=delete
skip_list_node & | operator= (const skip_list_node &)=delete
pointer | storage ()
reference | value ()
node_pointer | next (size_type level) const
void | set_next (size_type level, node_pointer next)
size_type | height () const
bool | fully_linked () const
void | mark_linked ()
lock_type | acquire ()

## Private Types

using | aligned_storage_type = typename std::aligned_storage< sizeof(value_type), alignof(value_type)>::type

## Private Member Functions

atomic_node_pointer & | my_next (size_type level)
const atomic_node_pointer & | my_next (size_type level) const

## Private Attributes

mutex_type | my_mutex
aligned_storage_type | my_val
size_type | my_height
std::atomic_bool | my_fullyLinked

## Detailed Description

### template<typename Value, typename Mutex>
class tbb::interface10::internal::skip_list_node< Value, Mutex >

Definition at line 56 of file _concurrent_skip_list_impl.h.

## Member Typedef Documentation

## aligned_storage_type

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::aligned_storage_type = typename std::aligned_storage<sizeof(value_type), alignof(value_type)>::type

private

Definition at line 125 of file _concurrent_skip_list_impl.h.

## atomic_node_pointer

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::atomic_node_pointer = std::atomic<node_pointer>

Definition at line 66 of file _concurrent_skip_list_impl.h.

## const_pointer

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::const_pointer = const value_type *

Definition at line 64 of file _concurrent_skip_list_impl.h.

## const_reference

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::const_reference = const value_type &

Definition at line 62 of file _concurrent_skip_list_impl.h.

## lock_type

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::lock_type = std::unique_lock<mutex_type>

Definition at line 69 of file _concurrent_skip_list_impl.h.

## mutex_type

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::mutex_type = Mutex

Definition at line 68 of file _concurrent_skip_list_impl.h.

## node_pointer

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::node_pointer = skip_list_node *

Definition at line 65 of file _concurrent_skip_list_impl.h.

## pointer

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::pointer = value_type *

Definition at line 63 of file _concurrent_skip_list_impl.h.

## reference

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::reference = value_type &

Definition at line 61 of file _concurrent_skip_list_impl.h.

## size_type

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::size_type = std::size_t

Definition at line 60 of file _concurrent_skip_list_impl.h.

## value_type

template<typename Value , typename Mutex >

using tbb::interface10::internal::skip_list_node< Value, Mutex >::value_type = Value

Definition at line 59 of file _concurrent_skip_list_impl.h.

## Constructor & Destructor Documentation

## skip_list_node() [1/3]

template<typename Value , typename Mutex >

tbb::interface10::internal::skip_list_node< Value, Mutex >::skip_list_node | ( | size_type | levels | ) |

inline

Definition at line 71 of file _concurrent_skip_list_impl.h.

: my_height(levels), my_fullyLinked(false) {
for (size_type lev = 0; lev < my_height; ++lev)
new(&my_next(lev)) atomic_node_pointer(nullptr);
__TBB_ASSERT(height() == levels, "Wrong node height");
}
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::interface10::internal::skip_list_node::my_height
size_type my_height
Definition: _concurrent_skip_list_impl.h:139
tbb::interface10::internal::skip_list_node::my_next
atomic_node_pointer & my_next(size_type level)
Definition: _concurrent_skip_list_impl.h:127
tbb::interface10::internal::skip_list_node::height
size_type height() const
Definition: _concurrent_skip_list_impl.h:108
tbb::interface10::internal::skip_list_node::atomic_node_pointer
std::atomic< node_pointer > atomic_node_pointer
Definition: _concurrent_skip_list_impl.h:66
tbb::interface10::internal::skip_list_node::my_fullyLinked
std::atomic_bool my_fullyLinked
Definition: _concurrent_skip_list_impl.h:140
tbb::interface10::internal::skip_list_node::size_type
std::size_t size_type
Definition: _concurrent_skip_list_impl.h:60

References __TBB_ASSERT, tbb::interface10::internal::skip_list_node< Value, Mutex >::height(), tbb::interface10::internal::skip_list_node< Value, Mutex >::my_height, and tbb::interface10::internal::skip_list_node< Value, Mutex >::my_next().

Here is the call graph for this function:

## ~skip_list_node()

template<typename Value , typename Mutex >

tbb::interface10::internal::skip_list_node< Value, Mutex >::~skip_list_node | ( |  | ) |

inline

Definition at line 77 of file _concurrent_skip_list_impl.h.

{
for(size_type lev = 0; lev < my_height; ++lev)
my_next(lev).~atomic();
}

References tbb::interface10::internal::skip_list_node< Value, Mutex >::my_height, and tbb::interface10::internal::skip_list_node< Value, Mutex >::my_next().

Here is the call graph for this function:

## skip_list_node() [2/3]

template<typename Value , typename Mutex >

tbb::interface10::internal::skip_list_node< Value, Mutex >::skip_list_node | ( | const skip_list_node< Value, Mutex > & |  | ) |

delete

## skip_list_node() [3/3]

template<typename Value , typename Mutex >

tbb::interface10::internal::skip_list_node< Value, Mutex >::skip_list_node | ( | skip_list_node< Value, Mutex > && |  | ) |

delete

## Member Function Documentation

## acquire()

template<typename Value , typename Mutex >

lock_type tbb::interface10::internal::skip_list_node< Value, Mutex >::acquire | ( |  | ) |

inline

Definition at line 120 of file _concurrent_skip_list_impl.h.

{
return lock_type(my_mutex);
}
tbb::interface10::internal::skip_list_node::my_mutex
mutex_type my_mutex
Definition: _concurrent_skip_list_impl.h:137
tbb::interface10::internal::skip_list_node::lock_type
std::unique_lock< mutex_type > lock_type
Definition: _concurrent_skip_list_impl.h:69

References tbb::interface10::internal::skip_list_node< Value, Mutex >::my_mutex.

## fully_linked()

template<typename Value , typename Mutex >

bool tbb::interface10::internal::skip_list_node< Value, Mutex >::fully_linked | ( |  | ) | const

inline

Definition at line 112 of file _concurrent_skip_list_impl.h.

{
return my_fullyLinked.load(std::memory_order_acquire);
}
tbb::internal::memory_order_acquire
@ memory_order_acquire
Definition: icc_generic.h:75

References tbb::internal::memory_order_acquire, and tbb::interface10::internal::skip_list_node< Value, Mutex >::my_fullyLinked.

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::internal_insert_node().

Here is the caller graph for this function:

## height()

template<typename Value , typename Mutex >

size_type tbb::interface10::internal::skip_list_node< Value, Mutex >::height | ( |  | ) | const

inline

Returns
  number of layers

Definition at line 108 of file _concurrent_skip_list_impl.h.

{
return my_height;
}

References tbb::interface10::internal::skip_list_node< Value, Mutex >::my_height.

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::clear(), tbb::interface10::internal::concurrent_skip_list< Traits >::delete_node(), tbb::interface10::internal::concurrent_skip_list< Traits >::fill_prev_next_arrays(), tbb::interface10::internal::concurrent_skip_list< Traits >::fill_prev_next_by_ptr(), tbb::interface10::internal::concurrent_skip_list< Traits >::internal_extract(), tbb::interface10::internal::concurrent_skip_list< Traits >::internal_get_bound(), tbb::interface10::internal::concurrent_skip_list< Traits >::internal_insert_node(), tbb::interface10::internal::skip_list_node< Value, Mutex >::next(), tbb::interface10::internal::skip_list_node< Value, Mutex >::set_next(), tbb::interface10::internal::skip_list_node< Value, Mutex >::skip_list_node(), and tbb::interface10::internal::concurrent_skip_list< Traits >::try_insert_node().

Here is the caller graph for this function:

## mark_linked()

template<typename Value , typename Mutex >

void tbb::interface10::internal::skip_list_node< Value, Mutex >::mark_linked | ( |  | ) |

inline

Definition at line 116 of file _concurrent_skip_list_impl.h.

{
my_fullyLinked.store(true, std::memory_order_release);
}
tbb::internal::memory_order_release
@ memory_order_release
Definition: icc_generic.h:76

References tbb::internal::memory_order_release, and tbb::interface10::internal::skip_list_node< Value, Mutex >::my_fullyLinked.

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::try_insert_node().

Here is the caller graph for this function:

## my_next() [1/2]

template<typename Value , typename Mutex >

atomic_node_pointer& tbb::interface10::internal::skip_list_node< Value, Mutex >::my_next | ( | size_type | level | ) |

inline private

Definition at line 127 of file _concurrent_skip_list_impl.h.

{
atomic_node_pointer* arr = reinterpret_cast<atomic_node_pointer*>(this + 1);
return arr[level];
}

Referenced by tbb::interface10::internal::skip_list_node< Value, Mutex >::next(), tbb::interface10::internal::skip_list_node< Value, Mutex >::set_next(), tbb::interface10::internal::skip_list_node< Value, Mutex >::skip_list_node(), and tbb::interface10::internal::skip_list_node< Value, Mutex >::~skip_list_node().

Here is the caller graph for this function:

## my_next() [2/2]

template<typename Value , typename Mutex >

const atomic_node_pointer& tbb::interface10::internal::skip_list_node< Value, Mutex >::my_next | ( | size_type | level | ) | const

inline private

Definition at line 132 of file _concurrent_skip_list_impl.h.

{
const atomic_node_pointer* arr = reinterpret_cast<const atomic_node_pointer*>(this + 1);
return arr[level];
}

## next()

template<typename Value , typename Mutex >

node_pointer tbb::interface10::internal::skip_list_node< Value, Mutex >::next | ( | size_type | level | ) | const

inline

Definition at line 96 of file _concurrent_skip_list_impl.h.

{
__TBB_ASSERT(level < height(), "Cannot get next on the level greater than height");
return my_next(level).load(std::memory_order_acquire);
}

References __TBB_ASSERT, tbb::interface10::internal::skip_list_node< Value, Mutex >::height(), tbb::internal::memory_order_acquire, and tbb::interface10::internal::skip_list_node< Value, Mutex >::my_next().

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::begin(), tbb::interface10::internal::concurrent_skip_list< Traits >::cbegin(), tbb::interface10::internal::concurrent_skip_list< Traits >::clear(), tbb::interface10::internal::concurrent_skip_list< Traits >::fill_prev_next_by_ptr(), tbb::interface10::internal::concurrent_skip_list< Traits >::internal_extract(), tbb::interface10::internal::skip_list_node< Value, Mutex >::set_next(), and tbb::interface10::internal::concurrent_skip_list< Traits >::try_lock_nodes().

Here is the call graph for this function:
Here is the caller graph for this function:

## operator=()

template<typename Value , typename Mutex >

skip_list_node& tbb::interface10::internal::skip_list_node< Value, Mutex >::operator= | ( | const skip_list_node< Value, Mutex > & |  | ) |

delete

## set_next()

template<typename Value , typename Mutex >

void tbb::interface10::internal::skip_list_node< Value, Mutex >::set_next | ( | size_type | level,
|  | node_pointer | next
| ) |  |

inline

Definition at line 101 of file _concurrent_skip_list_impl.h.

{
__TBB_ASSERT(level < height(), "Cannot set next on the level greater than height");
my_next(level).store(next, std::memory_order_release);
}
tbb::interface10::internal::skip_list_node::next
node_pointer next(size_type level) const
Definition: _concurrent_skip_list_impl.h:96

References __TBB_ASSERT, tbb::interface10::internal::skip_list_node< Value, Mutex >::height(), tbb::internal::memory_order_release, tbb::interface10::internal::skip_list_node< Value, Mutex >::my_next(), and tbb::interface10::internal::skip_list_node< Value, Mutex >::next().

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::clear(), and tbb::interface10::internal::concurrent_skip_list< Traits >::try_insert_node().

Here is the call graph for this function:
Here is the caller graph for this function:

## storage()

template<typename Value , typename Mutex >

pointer tbb::interface10::internal::skip_list_node< Value, Mutex >::storage | ( |  | ) |

inline

Definition at line 88 of file _concurrent_skip_list_impl.h.

{
return reinterpret_cast<pointer>(&my_val);
}
tbb::interface10::internal::skip_list_node::pointer
value_type * pointer
Definition: _concurrent_skip_list_impl.h:63
tbb::interface10::internal::skip_list_node::my_val
aligned_storage_type my_val
Definition: _concurrent_skip_list_impl.h:138

References tbb::interface10::internal::skip_list_node< Value, Mutex >::my_val.

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::create_node(), tbb::interface10::internal::concurrent_skip_list< Traits >::delete_node(), and tbb::interface10::internal::skip_list_node< Value, Mutex >::value().

Here is the caller graph for this function:

## value()

template<typename Value , typename Mutex >

reference tbb::interface10::internal::skip_list_node< Value, Mutex >::value | ( |  | ) |

inline

Definition at line 92 of file _concurrent_skip_list_impl.h.

{
return *storage();
}
tbb::interface10::internal::skip_list_node::storage
pointer storage()
Definition: _concurrent_skip_list_impl.h:88

References tbb::interface10::internal::skip_list_node< Value, Mutex >::storage().

Referenced by tbb::interface10::internal::concurrent_skip_list< Traits >::get_key().

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## my_fullyLinked

template<typename Value , typename Mutex >

std::atomic_bool tbb::interface10::internal::skip_list_node< Value, Mutex >::my_fullyLinked

private

Definition at line 140 of file _concurrent_skip_list_impl.h.

Referenced by tbb::interface10::internal::skip_list_node< Value, Mutex >::fully_linked(), and tbb::interface10::internal::skip_list_node< Value, Mutex >::mark_linked().

## my_height

template<typename Value , typename Mutex >

size_type tbb::interface10::internal::skip_list_node< Value, Mutex >::my_height

private

Definition at line 139 of file _concurrent_skip_list_impl.h.

Referenced by tbb::interface10::internal::skip_list_node< Value, Mutex >::height(), tbb::interface10::internal::skip_list_node< Value, Mutex >::skip_list_node(), and tbb::interface10::internal::skip_list_node< Value, Mutex >::~skip_list_node().

## my_mutex

template<typename Value , typename Mutex >

mutex_type tbb::interface10::internal::skip_list_node< Value, Mutex >::my_mutex

private

Definition at line 137 of file _concurrent_skip_list_impl.h.

Referenced by tbb::interface10::internal::skip_list_node< Value, Mutex >::acquire().

## my_val

template<typename Value , typename Mutex >

aligned_storage_type tbb::interface10::internal::skip_list_node< Value, Mutex >::my_val

private

Definition at line 138 of file _concurrent_skip_list_impl.h.

Referenced by tbb::interface10::internal::skip_list_node< Value, Mutex >::storage().

The documentation for this class was generated from the following file:

- _concurrent_skip_list_impl.h

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.