Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::concurrent_vector_base_v3::segment_t Class Reference

#include <concurrent_vector.h>

Collaboration diagram for tbb::internal::concurrent_vector_base_v3::segment_t:

Public Member Functions

 segment_t ()
 
 segment_t (segment_t const &rhs)
 
void swap (segment_t &rhs)
 
segment_toperator= (segment_t const &rhs)
 
template<memory_semantics M>
segment_value_t load () const
 
template<memory_semantics M>
void store (segment_not_used)
 
template<memory_semantics M>
void store (segment_allocation_failed)
 
template<memory_semantics M>
void store (void *allocated_segment_pointer) __TBB_NOEXCEPT(true)
 

Private Attributes

atomic< void * > array
 

Detailed Description

Definition at line 129 of file concurrent_vector.h.

Constructor & Destructor Documentation

◆ segment_t() [1/2]

tbb::internal::concurrent_vector_base_v3::segment_t::segment_t ( )
inline

Definition at line 132 of file concurrent_vector.h.

132 { store<relaxed>(segment_not_used());}

◆ segment_t() [2/2]

tbb::internal::concurrent_vector_base_v3::segment_t::segment_t ( segment_t const &  rhs)
inline

Definition at line 136 of file concurrent_vector.h.

136 { array.store<relaxed>(rhs.array.load<relaxed>());}
No ordering.
Definition: atomic.h:51
void store(value_type value)
Definition: atomic.h:317

References array, tbb::internal::atomic_impl< T >::load(), tbb::relaxed, and tbb::internal::atomic_impl< T >::store().

Here is the call graph for this function:

Member Function Documentation

◆ load()

template<memory_semantics M>
segment_value_t tbb::internal::concurrent_vector_base_v3::segment_t::load ( ) const
inline

Definition at line 148 of file concurrent_vector.h.

148 { return segment_value_t(array.load<M>());}
value_type load() const
Definition: atomic.h:306

References array, and tbb::internal::atomic_impl< T >::load().

Referenced by tbb::internal::concurrent_vector_base_v3::helper::cleanup(), tbb::internal::concurrent_vector_base_v3::helper::extend_segment_table(), tbb::internal::concurrent_vector_base_v3::internal_compact(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_free_segments(), and tbb::internal::concurrent_vector_base_v3::helper::segment_not_used_predicate::operator()().

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

◆ operator=()

segment_t& tbb::internal::concurrent_vector_base_v3::segment_t::operator= ( segment_t const &  rhs)
inline

Definition at line 142 of file concurrent_vector.h.

142  {
143  array.store<relaxed>(rhs.array.load<relaxed>());
144  return *this;
145  }
No ordering.
Definition: atomic.h:51
void store(value_type value)
Definition: atomic.h:317

References array, tbb::internal::atomic_impl< T >::load(), tbb::relaxed, and tbb::internal::atomic_impl< T >::store().

Here is the call graph for this function:

◆ store() [1/3]

template<memory_semantics M>
void tbb::internal::concurrent_vector_base_v3::segment_t::store ( segment_not_used  )
inline

Definition at line 151 of file concurrent_vector.h.

151  {
152  array.store<M>(0);
153  }
void store(value_type value)
Definition: atomic.h:317

References array, and tbb::internal::atomic_impl< T >::store().

Referenced by tbb::internal::concurrent_vector_base_v3::internal_compact(), and tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_free_segments().

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

◆ store() [2/3]

template<memory_semantics M>
void tbb::internal::concurrent_vector_base_v3::segment_t::store ( segment_allocation_failed  )
inline

Definition at line 156 of file concurrent_vector.h.

156  {
157  __TBB_ASSERT(load<relaxed>() != segment_allocated(),"transition from \"allocated\" to \"allocation failed\" state looks non-logical");
159  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static void *const vector_allocation_error_flag
Bad allocation marker.
void store(value_type value)
Definition: atomic.h:317

References __TBB_ASSERT, array, tbb::internal::atomic_impl< T >::store(), and tbb::internal::vector_allocation_error_flag.

Here is the call graph for this function:

◆ store() [3/3]

template<memory_semantics M>
void tbb::internal::concurrent_vector_base_v3::segment_t::store ( void allocated_segment_pointer)
inline

Definition at line 162 of file concurrent_vector.h.

162  {
163  __TBB_ASSERT(segment_value_t(allocated_segment_pointer) == segment_allocated(),
164  "other overloads of store should be used for marking segment as not_used or allocation_failed" );
165  array.store<M>(allocated_segment_pointer);
166  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void store(value_type value)
Definition: atomic.h:317

References __TBB_ASSERT, array, and tbb::internal::atomic_impl< T >::store().

Here is the call graph for this function:

◆ swap()

void tbb::internal::concurrent_vector_base_v3::segment_t::swap ( segment_t rhs)
inline

Definition at line 138 of file concurrent_vector.h.

138  {
139  tbb::internal::swap<relaxed>(array, rhs.array);
140  }

References array.

Member Data Documentation

◆ array

atomic<void*> tbb::internal::concurrent_vector_base_v3::segment_t::array
private

Definition at line 130 of file concurrent_vector.h.

Referenced by load(), operator=(), segment_t(), store(), and swap().


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

Copyright © 2005-2019 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.