Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Concurrent vector container.
More...
#include <concurrent_vector.h>
|
| concurrent_vector (const allocator_type &a=allocator_type()) |
| Construct empty vector. More...
|
|
| concurrent_vector (std::initializer_list< T > init_list, const allocator_type &a=allocator_type()) |
| Constructor from initializer_list. More...
|
|
| concurrent_vector (const concurrent_vector &vector, const allocator_type &a=allocator_type()) |
| Copying constructor. More...
|
|
| concurrent_vector (concurrent_vector &&source) |
| Move constructor. More...
|
|
| concurrent_vector (concurrent_vector &&source, const allocator_type &a) |
|
template<class M > |
| concurrent_vector (const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type()) |
| Copying constructor for vector with different allocator type. More...
|
|
| concurrent_vector (size_type n) |
| Construction with initial size specified by argument n. More...
|
|
| concurrent_vector (size_type n, const_reference t, const allocator_type &a=allocator_type()) |
| Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance. More...
|
|
template<class I > |
| concurrent_vector (I first, I last, const allocator_type &a=allocator_type()) |
| Construction with copying iteration range and given allocator instance. More...
|
|
concurrent_vector & | operator= (const concurrent_vector &vector) |
| Assignment. More...
|
|
concurrent_vector & | operator= (concurrent_vector &&other) |
| Move assignment. More...
|
|
template<class M > |
concurrent_vector & | operator= (const concurrent_vector< T, M > &vector) |
| Assignment for vector with different allocator type. More...
|
|
concurrent_vector & | operator= (std::initializer_list< T > init_list) |
| Assignment for initializer_list. More...
|
|
iterator | grow_by (size_type delta) |
| Grow by "delta" elements. More...
|
|
iterator | grow_by (size_type delta, const_reference t) |
| Grow by "delta" elements using copying constructor. More...
|
|
template<typename I > |
iterator | grow_by (I first, I last) |
|
iterator | grow_by (std::initializer_list< T > init_list) |
|
iterator | grow_to_at_least (size_type n) |
| Append minimal sequence of elements such that size()>=n. More...
|
|
iterator | grow_to_at_least (size_type n, const_reference t) |
|
iterator | push_back (const_reference item) |
| Push item. More...
|
|
iterator | push_back (T &&item) |
| Push item, move-aware. More...
|
|
template<typename... Args> |
iterator | emplace_back (Args &&... args) |
| Push item, create item "in place" with provided arguments. More...
|
|
reference | operator[] (size_type index) |
| Get reference to element at given index. More...
|
|
const_reference | operator[] (size_type index) const |
| Get const reference to element at given index. More...
|
|
reference | at (size_type index) |
| Get reference to element at given index. Throws exceptions on errors. More...
|
|
const_reference | at (size_type index) const |
| Get const reference to element at given index. Throws exceptions on errors. More...
|
|
range_type | range (size_t grainsize=1) |
| Get range for iterating with parallel algorithms. More...
|
|
const_range_type | range (size_t grainsize=1) const |
| Get const range for iterating with parallel algorithms. More...
|
|
size_type | size () const |
| Return size of vector. It may include elements under construction. More...
|
|
bool | empty () const |
| Return false if vector is not empty or has elements under construction at least. More...
|
|
size_type | capacity () const |
| Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value. More...
|
|
void | reserve (size_type n) |
| Allocate enough space to grow to size n without having to allocate more memory later. More...
|
|
void | resize (size_type n) |
| Resize the vector. Not thread-safe. More...
|
|
void | resize (size_type n, const_reference t) |
| Resize the vector, copy t for new elements. Not thread-safe. More...
|
|
void | shrink_to_fit () |
| Optimize memory usage and fragmentation. More...
|
|
size_type | max_size () const |
| Upper bound on argument to reserve. More...
|
|
iterator | begin () |
| start iterator More...
|
|
iterator | end () |
| end iterator More...
|
|
const_iterator | begin () const |
| start const iterator More...
|
|
const_iterator | end () const |
| end const iterator More...
|
|
const_iterator | cbegin () const |
| start const iterator More...
|
|
const_iterator | cend () const |
| end const iterator More...
|
|
reverse_iterator | rbegin () |
| reverse start iterator More...
|
|
reverse_iterator | rend () |
| reverse end iterator More...
|
|
const_reverse_iterator | rbegin () const |
| reverse start const iterator More...
|
|
const_reverse_iterator | rend () const |
| reverse end const iterator More...
|
|
const_reverse_iterator | crbegin () const |
| reverse start const iterator More...
|
|
const_reverse_iterator | crend () const |
| reverse end const iterator More...
|
|
reference | front () |
| the first item More...
|
|
const_reference | front () const |
| the first item const More...
|
|
reference | back () |
| the last item More...
|
|
const_reference | back () const |
| the last item const More...
|
|
allocator_type | get_allocator () const |
| return allocator object More...
|
|
void | assign (size_type n, const_reference t) |
| assign n items by copying t item More...
|
|
template<class I > |
void | assign (I first, I last) |
| assign range [first, last) More...
|
|
void | assign (std::initializer_list< T > init_list) |
| assigns an initializer list More...
|
|
void | swap (concurrent_vector &vector) |
| swap two instances More...
|
|
void | clear () |
| Clear container while keeping memory allocated. More...
|
|
| ~concurrent_vector () |
| Clear and destroy vector. More...
|
|
const internal::concurrent_vector_base_v3 & | internal_vector_base () const |
|
|
void | internal_free_segments (segment_t table[], segment_index_t k, segment_index_t first_block) |
| Free k segments from table. More...
|
|
T & | internal_subscript (size_type index) const |
| Get reference to element at given index. More...
|
|
T & | internal_subscript_with_exceptions (size_type index) const |
| Get reference to element at given index with errors checks. More...
|
|
void | internal_assign_n (size_type n, const_pointer p) |
| assign n items by copying t More...
|
|
template<class I > |
void | internal_assign_range (I first, I last, is_integer_tag< true > *) |
| assign integer items by copying when arguments are treated as iterators. See C++ Standard 2003 23.1.1p9 More...
|
|
template<class I > |
void | internal_assign_range (I first, I last, is_integer_tag< false > *) |
| inline proxy assign by iterators More...
|
|
template<class I > |
void | internal_assign_iterators (I first, I last) |
| assign by iterators More...
|
|
| concurrent_vector_base_v3 () |
|
__TBB_EXPORTED_METHOD | ~concurrent_vector_base_v3 () |
|
void __TBB_EXPORTED_METHOD | internal_reserve (size_type n, size_type element_size, size_type max_size) |
|
size_type __TBB_EXPORTED_METHOD | internal_capacity () const |
|
void | internal_grow (size_type start, size_type finish, size_type element_size, internal_array_op2 init, const void *src) |
|
size_type __TBB_EXPORTED_METHOD | internal_grow_by (size_type delta, size_type element_size, internal_array_op2 init, const void *src) |
|
void *__TBB_EXPORTED_METHOD | internal_push_back (size_type element_size, size_type &index) |
|
segment_index_t __TBB_EXPORTED_METHOD | internal_clear (internal_array_op1 destroy) |
|
void *__TBB_EXPORTED_METHOD | internal_compact (size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy) |
|
void __TBB_EXPORTED_METHOD | internal_copy (const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op2 copy) |
|
void __TBB_EXPORTED_METHOD | internal_assign (const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy) |
|
void __TBB_EXPORTED_METHOD | internal_throw_exception (size_type) const |
| Obsolete. More...
|
|
void __TBB_EXPORTED_METHOD | internal_swap (concurrent_vector_base_v3 &v) |
|
void __TBB_EXPORTED_METHOD | internal_resize (size_type n, size_type element_size, size_type max_size, const void *src, internal_array_op1 destroy, internal_array_op2 init) |
|
size_type __TBB_EXPORTED_METHOD | internal_grow_to_at_least_with_result (size_type new_size, size_type element_size, internal_array_op2 init, const void *src) |
|
void __TBB_EXPORTED_METHOD | internal_grow_to_at_least (size_type new_size, size_type element_size, internal_array_op2 init, const void *src) |
| Deprecated entry point for backwards compatibility to TBB 2.1. More...
|
|
|
static void * | internal_allocator (internal::concurrent_vector_base_v3 &vb, size_t k) |
| Allocate k items. More...
|
|
static void __TBB_EXPORTED_FUNC | initialize_array (void *begin, const void *, size_type n) |
| Construct n instances of T, starting at "begin". More...
|
|
static void __TBB_EXPORTED_FUNC | initialize_array_by (void *begin, const void *src, size_type n) |
| Copy-construct n instances of T, starting at "begin". More...
|
|
static void __TBB_EXPORTED_FUNC | copy_array (void *dst, const void *src, size_type n) |
| Copy-construct n instances of T by copying single element pointed to by src, starting at "dst". More...
|
|
static void __TBB_EXPORTED_FUNC | move_array (void *dst, const void *src, size_type n) |
| Move-construct n instances of T, starting at "dst" by copying according element of src array. More...
|
|
static void __TBB_EXPORTED_FUNC | move_assign_array (void *dst, const void *src, size_type n) |
| Move-assign (using operator=) n instances of T, starting at "dst" by assigning according element of src array. More...
|
|
template<typename Iterator > |
static void __TBB_EXPORTED_FUNC | copy_range (void *dst, const void *p_type_erased_iterator, size_type n) |
| Copy-construct n instances of T, starting at "dst" by iterator range of [p_type_erased_iterator, p_type_erased_iterator+n). More...
|
|
static void __TBB_EXPORTED_FUNC | assign_array (void *dst, const void *src, size_type n) |
| Assign (using operator=) n instances of T, starting at "dst" by assigning according element of src array. More...
|
|
static void __TBB_EXPORTED_FUNC | destroy_array (void *begin, size_type n) |
| Destroy n instances of T, starting at "begin". More...
|
|
template<typename I > |
void | copy_range (void *dst, const void *p_type_erased_iterator, size_type n) |
|
static segment_index_t | segment_index_of (size_type index) |
|
static segment_index_t | segment_base (segment_index_t k) |
|
static segment_index_t | segment_base_index_of (segment_index_t &index) |
|
static size_type | segment_size (segment_index_t k) |
|
static bool | is_first_element_in_segment (size_type element_index) |
|
template<typename T, class A>
class tbb::concurrent_vector< T, A >
Concurrent vector container.
concurrent_vector is a container having the following main properties:
- It provides random indexed access to its elements. The index of the first element is 0.
- It ensures safe concurrent growing its size (different threads can safely append new elements).
- Adding new elements does not invalidate existing iterators and does not change indices of existing items.
- Compatibility
- The class meets all Container Requirements and Reversible Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet Sequence Requirements due to absence of insert() and erase() methods.
- Exception Safety
- Methods working with memory allocation and/or new elements construction can throw an exception if allocator fails to allocate memory or element's default constructor throws one. Concurrent vector's element of type T must conform to the following requirements:
- Throwing an exception is forbidden for destructor of T.
- Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized.
Otherwise, the program's behavior is undefined.
- If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation. Invalid state means:
- There are no guarantees that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens.
- An invalid vector instance cannot be repaired; it is unable to grow anymore.
- Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful.
- Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exception, and in case of using at() method a C++ exception is thrown.
If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails.
- Fragmentation
- Unlike an STL vector, a concurrent_vector does not move existing elements if it needs to allocate more memory. The container is divided into a series of contiguous arrays of elements. The first reservation, growth, or assignment operation determines the size of the first array. Using small number of elements as initial size incurs fragmentation that may increase element access time. Internal layout can be optimized by method compact() that merges several smaller arrays into one solid.
- Changes since TBB 2.1
- Fixed guarantees of concurrent_vector::size() and grow_to_at_least() methods to assure elements are allocated.
- Methods end()/rbegin()/back() are partly thread-safe since they use size() to get the end of vector
- Added resize() methods (not thread-safe)
- Added cbegin/cend/crbegin/crend methods
- Changed return type of methods grow* and push_back to iterator
- Changes since TBB 2.0
- Implemented exception-safety guarantees
- Added template argument for allocator
- Added allocator argument in constructors
- Faster index calculation
- First growth call specifies a number of segments to be merged in the first allocation.
- Fixed memory blow up for swarm of vector's instances of small size
- Added grow_by(size_type n, const_reference t) growth using copying constructor to init new items.
- Added STL-like constructors.
- Added operators ==, < and derivatives
- Added at() method, approved for using after an exception was thrown inside the vector
- Added get_allocator() method.
- Added assign() methods
- Added compact() method to defragment first segments
- Added swap() method
- range() defaults on grainsize = 1 supporting auto grainsize algorithms.
Definition at line 64 of file concurrent_vector.h.
◆ allocator_type
template<typename T, class A>
◆ const_iterator
template<typename T, class A>
◆ const_range_type
template<typename T, class A>
◆ const_reverse_iterator
template<typename T, class A>
◆ difference_type
template<typename T, class A>
◆ iterator
template<typename T, class A>
◆ pointer
template<typename T, class A>
◆ range_type
template<typename T, class A>
◆ reference
template<typename T, class A>
◆ reverse_iterator
template<typename T, class A>
◆ size_type
template<typename T, class A>
◆ value_type
template<typename T, class A>
◆ concurrent_vector() [1/9]
template<typename T, class A>
◆ concurrent_vector() [2/9]
template<typename T, class A>
◆ concurrent_vector() [3/9]
template<typename T, class A>
◆ concurrent_vector() [4/9]
template<typename T, class A>
◆ concurrent_vector() [5/9]
template<typename T, class A>
◆ concurrent_vector() [6/9]
template<typename T, class A>
template<class M >
Copying constructor for vector with different allocator type.
Definition at line 680 of file concurrent_vector.h.
◆ concurrent_vector() [7/9]
template<typename T, class A>
◆ concurrent_vector() [8/9]
template<typename T, class A>
Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance.
Definition at line 707 of file concurrent_vector.h.
708 : internal::allocator_base<T, A>(a)
◆ concurrent_vector() [9/9]
template<typename T, class A>
template<class I >
Construction with copying iteration range and given allocator instance.
Definition at line 722 of file concurrent_vector.h.
723 : internal::allocator_base<T, A>(a)
◆ ~concurrent_vector()
template<typename T, class A>
◆ assign() [1/3]
template<typename T, class A>
template<class I >
◆ assign() [2/3]
template<typename T, class A>
◆ assign() [3/3]
template<typename T, class A>
◆ assign_array()
template<typename T , class A >
◆ at() [1/2]
template<typename T, class A>
Get reference to element at given index. Throws exceptions on errors.
Definition at line 877 of file concurrent_vector.h.
◆ at() [2/2]
template<typename T, class A>
Get const reference to element at given index. Throws exceptions on errors.
Definition at line 882 of file concurrent_vector.h.
◆ back() [1/2]
template<typename T, class A>
◆ back() [2/2]
template<typename T, class A>
◆ begin() [1/2]
template<typename T, class A>
◆ begin() [2/2]
template<typename T, class A>
◆ capacity()
template<typename T, class A>
Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value.
Definition at line 909 of file concurrent_vector.h.
◆ cbegin()
template<typename T, class A>
◆ cend()
template<typename T, class A>
◆ clear()
template<typename T, class A>
◆ copy_array()
template<typename T , class A >
◆ copy_range() [1/2]
template<typename T, class A>
template<typename Iterator >
Copy-construct n instances of T, starting at "dst" by iterator range of [p_type_erased_iterator, p_type_erased_iterator+n).
◆ copy_range() [2/2]
template<typename T, class A>
template<typename I >
Definition at line 1324 of file concurrent_vector.h.
1325 internal_loop_guide loop(n, dst);
1326 loop.iterate( *(static_cast<I*>(const_cast<void*>(p_type_erased_iterator))) );
◆ crbegin()
template<typename T, class A>
◆ crend()
template<typename T, class A>
◆ destroy_array()
template<typename T , class A >
Destroy n instances of T, starting at "begin".
Definition at line 1340 of file concurrent_vector.h.
1341 T* array = static_cast<T*>(
begin);
Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::assign(), tbb::concurrent_vector< padded_element, padded_allocator_type >::clear(), tbb::concurrent_vector< padded_element, padded_allocator_type >::concurrent_vector(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_assign_n(), tbb::concurrent_vector< padded_element, padded_allocator_type >::operator=(), tbb::concurrent_vector< padded_element, padded_allocator_type >::resize(), and tbb::concurrent_vector< padded_element, padded_allocator_type >::~concurrent_vector().
◆ emplace_back()
template<typename T, class A>
template<typename... Args>
Push item, create item "in place" with provided arguments.
Returns iterator pointing to the new element.
Definition at line 856 of file concurrent_vector.h.
858 push_back_helper prolog(*
this);
859 new(prolog.internal_push_back_result()) T(std::forward<Args>(args)...);
860 return prolog.return_iterator_and_dismiss();
◆ empty()
template<typename T, class A>
◆ end() [1/2]
template<typename T, class A>
◆ end() [2/2]
template<typename T, class A>
◆ front() [1/2]
template<typename T, class A>
the first item
Definition at line 964 of file concurrent_vector.h.
966 const segment_value_t& segment_value =
my_segment[0].template load<relaxed>();
967 return (segment_value.template pointer<T>())[0];
◆ front() [2/2]
template<typename T, class A>
the first item const
Definition at line 970 of file concurrent_vector.h.
972 const segment_value_t& segment_value =
my_segment[0].template load<relaxed>();
973 return (segment_value.template pointer<const T>())[0];
◆ get_allocator()
template<typename T, class A>
◆ grow_by() [1/4]
template<typename T, class A>
template<typename I >
Returns iterator pointing to the first new element.
Definition at line 795 of file concurrent_vector.h.
796 typename std::iterator_traits<I>::difference_type delta = std::distance(
first,
last);
◆ grow_by() [2/4]
template<typename T, class A>
◆ grow_by() [3/4]
template<typename T, class A>
Grow by "delta" elements using copying constructor.
Returns iterator pointing to the first new element.
Definition at line 789 of file concurrent_vector.h.
◆ grow_by() [4/4]
template<typename T, class A>
Returns iterator pointing to the first new element.
Definition at line 804 of file concurrent_vector.h.
805 return grow_by( init_list.begin(), init_list.end() );
◆ grow_to_at_least() [1/2]
template<typename T, class A>
Append minimal sequence of elements such that size()>=n.
The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. May return while other elements are being constructed by other threads. Returns iterator that points to beginning of appended sequence. If no elements were appended, returns iterator pointing to nth element.
Definition at line 814 of file concurrent_vector.h.
◆ grow_to_at_least() [2/2]
template<typename T, class A>
◆ initialize_array()
template<typename T , class A >
Construct n instances of T, starting at "begin".
Definition at line 1290 of file concurrent_vector.h.
1291 internal_loop_guide loop(n,
begin); loop.init();
Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::concurrent_vector(), tbb::concurrent_vector< padded_element, padded_allocator_type >::grow_by(), tbb::concurrent_vector< padded_element, padded_allocator_type >::grow_to_at_least(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_assign_n(), and tbb::concurrent_vector< padded_element, padded_allocator_type >::resize().
◆ initialize_array_by()
template<typename T , class A >
Copy-construct n instances of T, starting at "begin".
Definition at line 1295 of file concurrent_vector.h.
1296 internal_loop_guide loop(n,
begin); loop.init(src);
Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::assign(), tbb::concurrent_vector< padded_element, padded_allocator_type >::concurrent_vector(), tbb::concurrent_vector< padded_element, padded_allocator_type >::grow_by(), tbb::concurrent_vector< padded_element, padded_allocator_type >::grow_to_at_least(), tbb::concurrent_vector< padded_element, padded_allocator_type >::internal_assign_n(), and tbb::concurrent_vector< padded_element, padded_allocator_type >::resize().
◆ internal_allocator()
template<typename T, class A>
◆ internal_assign_iterators()
template<typename T , class A >
template<class I >
◆ internal_assign_n()
template<typename T, class A>
◆ internal_assign_range() [1/2]
template<typename T, class A>
template<class I >
◆ internal_assign_range() [2/2]
template<typename T, class A>
template<class I >
◆ internal_free_segments()
template<typename T , class A >
◆ internal_subscript()
template<typename T , class A >
◆ internal_subscript_with_exceptions()
template<typename T , class A >
◆ internal_vector_base()
template<typename T, class A>
◆ max_size()
template<typename T, class A>
◆ move_array()
template<typename T , class A >
◆ move_assign_array()
template<typename T , class A >
◆ operator=() [1/4]
template<typename T, class A>
◆ operator=() [2/4]
template<typename T, class A>
◆ operator=() [3/4]
template<typename T, class A>
template<class M >
Assignment for vector with different allocator type.
Definition at line 762 of file concurrent_vector.h.
763 if( static_cast<void*>(
this ) != static_cast<const void*>( &vector ) )
◆ operator=() [4/4]
template<typename T, class A>
◆ operator[]() [1/2]
template<typename T, class A>
Get reference to element at given index.
This method is thread-safe for concurrent reads, and also while growing the vector, as long as the calling thread has checked that index < size().
Definition at line 867 of file concurrent_vector.h.
◆ operator[]() [2/2]
template<typename T, class A>
◆ push_back() [1/2]
template<typename T, class A>
Push item.
Returns iterator pointing to the new element.
Definition at line 836 of file concurrent_vector.h.
838 push_back_helper prolog(*
this);
839 new(prolog.internal_push_back_result()) T(item);
840 return prolog.return_iterator_and_dismiss();
◆ push_back() [2/2]
template<typename T, class A>
Push item, move-aware.
Returns iterator pointing to the new element.
Definition at line 846 of file concurrent_vector.h.
848 push_back_helper prolog(*
this);
849 new(prolog.internal_push_back_result()) T(
std::move(item));
850 return prolog.return_iterator_and_dismiss();
◆ range() [1/2]
template<typename T, class A>
◆ range() [2/2]
template<typename T, class A>
◆ rbegin() [1/2]
template<typename T, class A>
◆ rbegin() [2/2]
template<typename T, class A>
◆ rend() [1/2]
template<typename T, class A>
◆ rend() [2/2]
template<typename T, class A>
◆ reserve()
template<typename T, class A>
◆ resize() [1/2]
template<typename T, class A>
◆ resize() [2/2]
template<typename T, class A>
Resize the vector, copy t for new elements. Not thread-safe.
Definition at line 925 of file concurrent_vector.h.
◆ shrink_to_fit()
template<typename T , class A >
Optimize memory usage and fragmentation.
Definition at line 1193 of file concurrent_vector.h.
1194 internal_segments_table old;
1197 #if __TBB_MOVE_IF_NOEXCEPT_PRESENT
1198 &move_array_if_noexcept
1206 if( old.first_block )
◆ size()
template<typename T, class A>
Return size of vector. It may include elements under construction.
Definition at line 900 of file concurrent_vector.h.
902 return cp < sz ? cp : sz;
Referenced by tbb::concurrent_vector< padded_element, padded_allocator_type >::back(), tbb::concurrent_vector< padded_element, padded_allocator_type >::cend(), tbb::concurrent_vector< padded_element, padded_allocator_type >::end(), tbb::interface6::enumerable_thread_specific< T, my_alloc, ets_no_key >::end(), tbb::concurrent_vector< padded_element, padded_allocator_type >::front(), tbb::interface6::enumerable_thread_specific< T, my_alloc, ets_no_key >::internal_copy(), tbb::interface6::enumerable_thread_specific< T, my_alloc, ets_no_key >::internal_move(), and tbb::interface6::enumerable_thread_specific< T, my_alloc, ets_no_key >::size().
◆ swap()
template<typename T, class A>
◆ internal::vector_iterator
template<typename T, class A>
template<typename C , typename U >
◆ const_pointer
template<typename T, class A>
◆ const_reference
template<typename T, class A>
The documentation for this class was generated from the following file:
size_type max_size() const
Upper bound on argument to reserve.
void internal_assign_iterators(I first, I last)
assign by iterators
static void __TBB_EXPORTED_FUNC move_assign_array(void *dst, const void *src, size_type n)
Move-assign (using operator=) n instances of T, starting at "dst" by assigning according element of s...
void(__TBB_EXPORTED_FUNC * internal_array_op2)(void *dst, const void *src, size_type n)
An operation on n-element destination array and n-element source array.
void __TBB_EXPORTED_METHOD internal_reserve(size_type n, size_type element_size, size_type max_size)
generic_range_type< iterator > range_type
void internal_assign_range(I first, I last, is_integer_tag< true > *)
assign integer items by copying when arguments are treated as iterators. See C++ Standard 2003 23....
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
std::reverse_iterator< iterator > reverse_iterator
void __TBB_EXPORTED_METHOD internal_copy(const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op2 copy)
size_type __TBB_EXPORTED_METHOD internal_grow_by(size_type delta, size_type element_size, internal_array_op2 init, const void *src)
iterator begin()
start iterator
void move(tbb_thread &t1, tbb_thread &t2)
void const char const char int ITT_FORMAT __itt_group_sync p
static void * internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k)
Allocate k items.
allocator_type my_allocator
void internal_free_segments(segment_t table[], segment_index_t k, segment_index_t first_block)
Free k segments from table.
static segment_index_t segment_base_index_of(segment_index_t &index)
Number of slots for segment pointers inside the class.
auto first(Container &c) -> decltype(begin(c))
auto last(Container &c) -> decltype(begin(c))
T & internal_subscript(size_type index) const
Get reference to element at given index.
static size_type segment_size(segment_index_t k)
T & internal_subscript_with_exceptions(size_type index) const
Get reference to element at given index with errors checks.
concurrent_vector(const allocator_type &a=allocator_type())
Construct empty vector.
atomic< size_type > my_first_block
count of segments in the first block
static void __TBB_EXPORTED_FUNC assign_array(void *dst, const void *src, size_type n)
Assign (using operator=) n instances of T, starting at "dst" by assigning according element of src ar...
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
iterator grow_by(size_type delta)
Grow by "delta" elements.
void __TBB_EXPORTED_METHOD internal_resize(size_type n, size_type element_size, size_type max_size, const void *src, internal_array_op1 destroy, internal_array_op2 init)
void internal_assign_n(size_type n, const_pointer p)
assign n items by copying t
concurrent_vector_base_v3 concurrent_vector_base
static void __TBB_EXPORTED_FUNC copy_array(void *dst, const void *src, size_type n)
Copy-construct n instances of T by copying single element pointed to by src, starting at "dst".
void __TBB_EXPORTED_METHOD internal_swap(concurrent_vector_base_v3 &v)
atomic< size_type > my_early_size
Requested size of vector.
size_type __TBB_EXPORTED_METHOD internal_grow_to_at_least_with_result(size_type new_size, size_type element_size, internal_array_op2 init, const void *src)
segment_index_t __TBB_EXPORTED_METHOD internal_clear(internal_array_op1 destroy)
internal::vector_iterator< concurrent_vector, const T > const_iterator
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
static void __TBB_EXPORTED_FUNC initialize_array(void *begin, const void *, size_type n)
Construct n instances of T, starting at "begin".
static void __TBB_EXPORTED_FUNC destroy_array(void *begin, size_type n)
Destroy n instances of T, starting at "begin".
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()
size_type __TBB_EXPORTED_METHOD internal_capacity() const
generic_range_type< const_iterator > const_range_type
atomic< segment_t * > my_segment
Pointer to the segments table.
size_type size() const
Return size of vector. It may include elements under construction.
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
static void __TBB_EXPORTED_FUNC move_array(void *dst, const void *src, size_type n)
Move-construct n instances of T, starting at "dst" by copying according element of src array.
void __TBB_EXPORTED_METHOD internal_assign(const concurrent_vector_base_v3 &src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy)
internal::vector_iterator< concurrent_vector, T > iterator
static void __TBB_EXPORTED_FUNC initialize_array_by(void *begin, const void *src, size_type n)
Copy-construct n instances of T, starting at "begin".
std::reverse_iterator< const_iterator > const_reverse_iterator
void *__TBB_EXPORTED_METHOD internal_compact(size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy)
internal::concurrent_vector_base_v3::size_type size_type
void clear()
Clear container while keeping memory allocated.
void *(* vector_allocator_ptr)(concurrent_vector_base_v3 &, size_t)
allocator function pointer
friend void enforce_segment_allocated(segment_value_t const &s, internal::exception_id exception=eid_bad_last_alloc)
segment_t my_storage[pointers_per_short_table]
embedded storage of segment pointers
iterator end()
end iterator
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.