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 125 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 128 of file concurrent_vector.h.

128 { 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 132 of file concurrent_vector.h.

132 { array.store<relaxed>(rhs.array.load<relaxed>());}
void store(value_type value)
Definition: atomic.h:313
No ordering.
Definition: atomic.h:47

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()

◆ operator=()

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

Definition at line 138 of file concurrent_vector.h.

138  {
139  array.store<relaxed>(rhs.array.load<relaxed>());
140  return *this;
141  }
void store(value_type value)
Definition: atomic.h:313
No ordering.
Definition: atomic.h:47

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 147 of file concurrent_vector.h.

147  {
148  array.store<M>(0);
149  }
void store(value_type value)
Definition: atomic.h:313

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 152 of file concurrent_vector.h.

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

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 158 of file concurrent_vector.h.

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

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 134 of file concurrent_vector.h.

134  {
135  tbb::internal::swap<relaxed>(array, rhs.array);
136  }

References array.

Member Data Documentation

◆ array

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

Definition at line 126 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.