Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::interface5::internal::split_ordered_list< T, Allocator >::node Struct Reference

#include <_concurrent_unordered_impl.h>

Inheritance diagram for tbb::interface5::internal::split_ordered_list< T, Allocator >::node:
Collaboration diagram for tbb::interface5::internal::split_ordered_list< T, Allocator >::node:

Public Member Functions

void init (sokey_t order_key)
 
sokey_t get_order_key () const
 
value_typestorage ()
 
value_typevalue ()
 
nodeptr_t atomic_set_next (nodeptr_t new_node, nodeptr_t current_node)
 
bool is_dummy () const
 
- Public Member Functions inherited from tbb::internal::no_assign
void operator= (const no_assign &)=delete
 
 no_assign (const no_assign &)=default
 
 no_assign ()=default
 

Public Attributes

nodeptr_t my_next
 
value_type my_element
 
sokey_t my_order_key
 

Private Member Functions

 node ()
 

Detailed Description

template<typename T, typename Allocator>
struct tbb::interface5::internal::split_ordered_list< T, Allocator >::node

Definition at line 228 of file _concurrent_unordered_impl.h.

Constructor & Destructor Documentation

◆ node()

template<typename T, typename Allocator>
tbb::interface5::internal::split_ordered_list< T, Allocator >::node::node ( )
private

Member Function Documentation

◆ atomic_set_next()

template<typename T, typename Allocator>
nodeptr_t tbb::interface5::internal::split_ordered_list< T, Allocator >::node::atomic_set_next ( nodeptr_t  new_node,
nodeptr_t  current_node 
)
inline

Definition at line 255 of file _concurrent_unordered_impl.h.

256  {
257  // Try to change the next pointer on the current element to a new element, only if it still points to the cached next
258  nodeptr_t exchange_node = tbb::internal::as_atomic(my_next).compare_and_swap(new_node, current_node);
259 
260  if (exchange_node == current_node) // TODO: why this branch?
261  {
262  // Operation succeeded, return the new node
263  return new_node;
264  }
265  else
266  {
267  // Operation failed, return the "interfering" node
268  return exchange_node;
269  }
270  }
atomic< T > & as_atomic(T &t)
Definition: atomic.h:572

References tbb::internal::as_atomic(), and tbb::interface5::internal::split_ordered_list< T, Allocator >::node::my_next.

Referenced by tbb::interface5::internal::split_ordered_list< value_type, typename Traits::allocator_type >::try_insert_atomic().

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

◆ get_order_key()

template<typename T, typename Allocator>
sokey_t tbb::interface5::internal::split_ordered_list< T, Allocator >::node::get_order_key ( ) const
inline

◆ init()

◆ is_dummy()

template<typename T, typename Allocator>
bool tbb::interface5::internal::split_ordered_list< T, Allocator >::node::is_dummy ( ) const
inline

◆ storage()

template<typename T, typename Allocator>
value_type* tbb::interface5::internal::split_ordered_list< T, Allocator >::node::storage ( )
inline

Definition at line 246 of file _concurrent_unordered_impl.h.

246  {
247  return reinterpret_cast<value_type*>(&my_element);
248  }

References tbb::interface5::internal::split_ordered_list< T, Allocator >::node::my_element.

Referenced by tbb::interface5::internal::split_ordered_list< T, Allocator >::node::value().

Here is the caller graph for this function:

◆ value()

template<typename T, typename Allocator>
value_type& tbb::interface5::internal::split_ordered_list< T, Allocator >::node::value ( )
inline

Definition at line 250 of file _concurrent_unordered_impl.h.

250  {
251  return *storage();
252  }

References tbb::interface5::internal::split_ordered_list< T, Allocator >::node::storage().

Here is the call graph for this function:

Member Data Documentation

◆ my_element

template<typename T, typename Allocator>
value_type tbb::interface5::internal::split_ordered_list< T, Allocator >::node::my_element

◆ my_next

◆ my_order_key


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

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.