31 #define _PPL_CONTAINER
33 #if !(defined (_M_X64) || defined (_M_IX86) || defined (_M_ARM))
34 #error ERROR: Concurrency Runtime is supported only on X64, X86 and ARM architectures.
38 #error ERROR: Concurrency Runtime is not supported when compiling /clr.
41 #pragma pack(push,_CRT_PACKING)
42 #pragma warning (push)
43 #pragma warning (disable: 4510 4512 4610) // disable warnings for compiler unable to generate constructor
53 template<
typename _Ty,
class _Ax = std::allocator<_Ty> >
60 #define _BAD_ALLOC_MARKER reinterpret_cast<void*>(63)
99 _My_storage[_I]._My_array =
NULL;
139 _Size_type
_Internal_grow_segment(
const _Size_type _Start, _Size_type _Finish, _Size_type _Element_size,
_Segment_t** _PPSegment, _Size_type* _PSegStart, _Size_type* _PSegFinish );
174 template<
typename _Container,
typename _Value>
187 template<
typename _C,
typename _Ty>
190 template<
typename _C,
typename _Ty,
typename _U>
193 template<
typename _C,
typename _Ty,
typename _U>
196 template<
typename _C,
typename _Ty,
typename _U>
199 template<
typename _C,
typename _U>
200 friend class ::Concurrency::details::_Vector_iterator;
202 template<
typename _Ty,
class _Ax>
203 friend class ::Concurrency::concurrent_vector;
206 : _My_vector(const_cast<_Container*>(&_Vec)),
208 _My_item(static_cast<
_Value*>(_Ptr))
220 : _My_vector(_Other._My_vector),
221 _My_index(_Other._My_index),
222 _My_item(_Other._My_item)
250 _Item = _My_item = &_My_vector->_Internal_subscript(_My_index);
251 _CONCRT_ASSERT( _Item==&_My_vector->_Internal_subscript(_My_index));
256 return _My_vector->_Internal_subscript(_My_index+_K);
270 if( (_K& (_K-2))==0 )
287 size_t _K = _My_index--;
291 if( (_K& (_K-2))==0 )
329 template<
typename _Container,
typename _Value>
335 template<
typename _Container,
typename _Ty>
341 template<
typename _Container,
typename _Ty,
typename _U>
347 template<
typename _Container,
typename _Ty,
typename _U>
353 template<
typename _Container,
typename _Ty,
typename _U>
356 return _I.
_My_index<_J._My_index && _I._My_vector == _J._My_vector;
359 template<
typename _Container,
typename _Ty,
typename _U>
365 template<
typename _Container,
typename _Ty,
typename _U>
371 template<
typename _Container,
typename _Ty,
typename _U>
377 template<
typename _Container,
typename _Ty,
typename _U>
383 template<
typename _Ty,
class _Ax>
387 typedef typename _Ax::template
416 template<
typename _Ty,
class _Ax>
417 class concurrent_vector:
protected details::_Allocator_base<_Ty, _Ax>,
418 private details::_Concurrent_vector_base_v4
423 template<
typename _C,
typename _U>
607 _Concurrent_vector_base_v4::_Internal_swap(_Vector._Internal_vector_base());
695 template<
class _InputIterator>
715 if(
this != &_Vector )
736 if( static_cast<void*>(
this ) != static_cast<const void*>( &_Vector ) )
738 _Concurrent_vector_base_v4::_Internal_assign(_Vector._Internal_vector_base(),
756 if( static_cast<void*>(
this ) != static_cast<const void*>( &_Vector ) )
758 _Concurrent_vector_base_v4::_Internal_swap(_Vector._Internal_vector_base());
798 iterator
grow_by( size_type _Delta, const_reference _Item )
929 reference
at( size_type _Index )
954 const_reference
at( size_type _Index )
const
975 return _Cp < _Sz ? _Cp : _Sz;
1202 const_reverse_iterator
rend()
const
1217 return (((
const _Myt *)
this)->
begin());
1230 return (((
const _Myt *)
this)->
end());
1243 return (((
const _Myt *)
this)->
rbegin());
1256 return (((
const _Myt *)
this)->
rend());
1270 return static_cast<_Ty*
>(
_My_segment[0]._My_array)[0];
1284 return static_cast<_Ty*
>(
_My_segment[0]._My_array)[0];
1345 void assign(size_type _N, const_reference _Item)
1370 template<
class _InputIterator>
1371 void assign(_InputIterator _Begin, _InputIterator _End)
1386 if(
this != &_Vector )
1388 _Concurrent_vector_base_v4::_Internal_swap(static_cast<_Concurrent_vector_base_v4&>(_Vector));
1458 static void __cdecl
_Initialize_array(
void* _Begin,
const void*, size_type _N );
1464 static void __cdecl
_Copy_array(
void* _Dst,
const void*
_Src, size_type _N );
1467 static void __cdecl
_Assign_array(
void* _Dst,
const void*
_Src, size_type _N );
1470 static void __cdecl
_Destroy_array(
void* _Begin, size_type _N );
1480 : _My_array(static_cast<pointer>(_Ptr)), _N(_NTrials), _I(0)
1486 for(; _I <
_N; ++
_I)
1487 new( &_My_array[_I] ) _Ty();
1491 for(; _I <
_N; ++
_I)
1492 new( &_My_array[_I] ) _Ty(*static_cast<const _Ty*>(_Src));
1496 for(; _I <
_N; ++
_I)
1497 new( &_My_array[_I] ) _Ty(static_cast<const _Ty*>(_Src)[_I]);
1501 for(; _I <
_N; ++
_I)
1502 _My_array[_I] = static_cast<const _Ty*>(_Src)[
_I];
1507 new( &_My_array[_I] ) _Ty( *_Src );
1512 std::memset(_My_array+_I, 0, (_N-_I)*
sizeof(value_type));
1528 template<
typename _Ty,
class _Ax>
1534 if( _Internal_compact(
sizeof(_Ty), &_Old, &_Destroy_array, &_Copy_array ) )
1545 template<
typename _Ty,
class _Ax>
1549 while( _K > _First_block )
1552 _Ty* _Array =
static_cast<_Ty*
>(_Table[_K]);
1555 this->_My_allocator.deallocate( _Array, _Segment_size(_K) );
1557 _Ty* _Array =
static_cast<_Ty*
>(_Table[0]);
1562 _Table[--_K] =
NULL;
1563 this->_My_allocator.deallocate( _Array, _Segment_size(_First_block) );
1567 template<
typename _Ty,
class _Ax>
1571 size_type _J = _Index;
1575 _Ty* _Array =
static_cast<_Ty*
>(_My_segment[_K]._My_array);
1581 template<
typename _Ty,
class _Ax>
1584 if( _Index >= _My_early_size )
1585 _Internal_throw_exception(0);
1586 size_type _J = _Index;
1588 if( _My_segment == (
_Segment_t*)_My_storage && _K >= _Pointers_per_short_table )
1589 _Internal_throw_exception(1);
1590 void *_Array = _My_segment[_K]._My_array;
1592 _Internal_throw_exception(2);
1593 return static_cast<_Ty*
>(_Array)[_J];
1596 template<
typename _Ty,
class _Ax>
1602 _Internal_reserve(_N,
sizeof(_Ty), max_size());
1603 _My_early_size =
_N;
1605 _Size_type _Sz = _Segment_size( _My_first_block );
1608 _Initialize_array_by(static_cast<_Ty*>(_My_segment[_K]._My_array), static_cast<const void*>(&_Item), _Sz);
1612 _K = _My_first_block;
1619 _Initialize_array_by(static_cast<_Ty*>(_My_segment[_K]._My_array), static_cast<const void*>(&_Item), _N);
1622 template<
typename _Ty,
class _Ax>
template<
class _I>
1628 _Internal_reserve(_N,
sizeof(_Ty), max_size());
1629 _My_early_size =
_N;
1631 _Size_type _Sz = _Segment_size( _My_first_block );
1639 _K = _My_first_block;
1651 template<
typename _Ty,
class _Ax>
1657 template<
typename _Ty,
class _Ax>
1663 template<
typename _Ty,
class _Ax>
1668 template<
typename _Ty,
class _Ax>
1674 #pragma warning(push)
1675 #pragma warning(disable: 4189)
1677 template<
typename _Ty,
class _Ax>
1680 _Ty* _Array =
static_cast<_Ty*
>(_Begin);
1681 for( size_type _J=_N; _J>0; --_J )
1682 _Array[_J-1].~_Ty();
1685 #pragma warning(pop)
1719 template<
typename _Ty,
class A1,
class A2>
1723 if(_A.size() != _B.size())
1727 for(; _I != _A.end(); ++_I, ++_J)
1766 template<
typename _Ty,
class A1,
class A2>
1804 template<
typename _Ty,
class A1,
class A2>
1842 template<
typename _Ty,
class A1,
class A2>
1880 template<
typename _Ty,
class A1,
class A2>
1918 template<
typename _Ty,
class A1,
class A2>
1954 template<
typename _Ty,
class _Ax>
1964 #pragma warning (pop)
_CRTIMP2 _Size_type _Internal_capacity() const
void _Internal_grow(_Size_type _Start, _Size_type _Finish, _Size_type _Element_size, _My_internal_array_op2 _Init, const void *_Src)
reference operator[](size_type _Index)
Provides access to the element at the given index in the concurrent vector. This method is concurrenc...
Definition: concurrent_vector.h:881
const_reverse_iterator rend() const
Returns an iterator of type reverse_iterator or const_reverse_iterator to the end of the concurrent...
Definition: concurrent_vector.h:1202
void(__cdecl * _My_internal_array_op2)(void *_Dst, const void *_Src, _Size_type _N)
Definition: concurrent_vector.h:127
Definition: xtr1common:34
_Vector_iterator operator++(int)
Definition: concurrent_vector.h:305
_Check_return_opt_ _In_ long _Offset
Definition: io.h:334
void *__cdecl * _My_vector_allocator_ptr(_Concurrent_vector_base_v4 &, size_t)
concurrent_vector(const concurrent_vector &_Vector)
Constructs a concurrent vector.
Definition: concurrent_vector.h:545
_Vector_iterator operator+(ptrdiff_t _Offset) const
Definition: concurrent_vector.h:226
const ::Concurrency::details::_Concurrent_vector_base_v4 & _Internal_vector_base() const
Definition: concurrent_vector.h:1418
size_t _Size_type
Definition: concurrent_vector.h:69
_CRTIMP2 void _Internal_copy(const _Concurrent_vector_base_v4 &_Src, _Size_type _Element_size, _My_internal_array_op2 _Copy)
iterator push_back(_Ty &&_Item)
Appends the given item to the end of the concurrent vector. This method is concurrency-safe.
Definition: concurrent_vector.h:855
_CRTIMP2 void _Internal_throw_exception(_Size_type) const
_CRTIMP2 ~_Concurrent_vector_base_v4()
const_reference front() const
Returns a reference or a const reference to the first element in the concurrent vector. If the concurrent vector is empty, the return value is undefined. This method is concurrency-safe.
Definition: concurrent_vector.h:1281
_Vector_iterator(const _Vector_iterator< _Container, typename _Container::value_type > &_Other)
Definition: concurrent_vector.h:219
~_Internal_loop_guide()
Definition: concurrent_vector.h:1509
_Value & operator*() const
Definition: concurrent_vector.h:246
_Vector_iterator & operator-=(ptrdiff_t _Offset)
Definition: concurrent_vector.h:240
concurrent_vector(const allocator_type &_Al=allocator_type())
Constructs a concurrent vector.
Definition: concurrent_vector.h:521
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_Value * operator->() const
Definition: concurrent_vector.h:258
_Value value_type
Definition: concurrent_vector.h:323
void _Internal_truncate(_Size_type _Old_size, _Size_type _New_size, _Size_type _Element_size, _My_internal_array_op1 _Destroy)
_Vector_iterator()
Definition: concurrent_vector.h:214
void _Assign(const void *_Src)
Definition: concurrent_vector.h:1499
~concurrent_vector()
Erases all elements and destroys this concurrent vector.
Definition: concurrent_vector.h:1411
Definition: concurrent_vector.h:63
_Value * pointer
Definition: concurrent_vector.h:324
reverse_iterator rend()
Returns an iterator of type reverse_iterator or const_reverse_iterator to the end of the concurrent...
Definition: concurrent_vector.h:1174
const _Ty * const_pointer
A type that provides a pointer to a const element in a concurrent vector.
Definition: concurrent_vector.h:475
void _Init()
Definition: concurrent_vector.h:1484
#define _CONCRT_ASSERT(x)
Definition: concrt.h:137
bool operator==(const _Concurrent_queue_iterator< _C, _Ty > &_I, const _Concurrent_queue_iterator< _C, _U > &_J)
Definition: concurrent_queue.h:317
_W64 unsigned int size_t
Definition: crtdefs.h:496
concurrent_vector(size_type _N, const_reference _Item, const allocator_type &_Al=allocator_type())
Constructs a concurrent vector.
Definition: concurrent_vector.h:661
_Vector_iterator(const _Container &_Vec, size_t _Index, void *_Ptr=NULL)
Definition: concurrent_vector.h:205
iterator grow_to_at_least(size_type _N)
Grows this concurrent vector until it has at least _N elements. This method is concurrency-safe.
Definition: concurrent_vector.h:814
size_type capacity() const
Returns the maximum size to which the concurrent vector can grow without having to allocate more memo...
Definition: concurrent_vector.h:1001
ptrdiff_t difference_type
A type that provides the signed distance between two elements in a concurrent vector.
Definition: concurrent_vector.h:450
reference at(size_type _Index)
Provides access to the element at the given index in the concurrent vector. This method is concurrenc...
Definition: concurrent_vector.h:929
void swap(concurrent_vector< _Ty, _Ax > &_A, concurrent_vector< _Ty, _Ax > &_B)
Exchanges the elements of two concurrent_vector objects.
Definition: concurrent_vector.h:1955
_N
Definition: wchar.h:1269
static _Size_type _Segment_size(_Segment_index_t _K)
Definition: concurrent_vector.h:118
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
size_type _I
Definition: concurrent_vector.h:1478
typedef void(__cdecl *_se_translator_function)(unsigned int
details::_Vector_iterator< concurrent_vector, _Ty > iterator
A type that provides a random-access iterator that can read any element in a concurrent vector...
Definition: concurrent_vector.h:482
The Concurrency namespace provides classes and functions that provide access to the Concurrency Runti...
Definition: agents.h:42
bool operator!=(const _Tuple_type< _Rank > &_Lhs, const _Tuple_type< _Rank > &_Rhs) __GPU
Definition: amp.h:816
static _Segment_index_t _Segment_base_index_of(_Segment_index_t &_Index)
Definition: concurrent_vector.h:111
Definition: concurrent_vector.h:1440
void swap(concurrent_vector &_Vector)
Swaps the contents of two concurrent vectors. This method is not concurrency-safe.
Definition: concurrent_vector.h:1384
void _Internal_assign(_I _First, _I _Last, _Is_integer_tag< true > *)
Definition: concurrent_vector.h:1444
Definition: concurrent_vector.h:175
friend ptrdiff_t operator-(const _Vector_iterator< _C, _Ty > &, const _Vector_iterator< _C, _U > &)
_Ty & reference
A type that provides a reference to an element stored in a concurrent vector.
Definition: concurrent_vector.h:456
_Internal_loop_guide(size_type _NTrials, void *_Ptr)
Definition: concurrent_vector.h:1479
void * _My_array
Definition: concurrent_vector.h:81
const pointer _My_array
Definition: concurrent_vector.h:1476
iterator grow_by(size_type _Delta)
Grows this concurrent vector by _Delta elements. This method is concurrency-safe.
Definition: concurrent_vector.h:777
_CRTIMP2 _Segment_index_t _Internal_clear(_My_internal_array_op1 _Destroy)
static void __cdecl _Initialize_array(void *_Begin, const void *, size_type _N)
Definition: concurrent_vector.h:1652
#define NULL
Definition: crtdbg.h:30
static const _Segment_index_t _Pointers_per_long_table
Definition: concurrent_vector.h:76
void assign(size_type _N, const_reference _Item)
Erases the elements of the concurrent vector and assigns to it either _N copies of _Item ...
Definition: concurrent_vector.h:1345
details::_Allocator_base< _Ty, _Ax >::_Allocator_type allocator_type
A type that represents the allocator class for the concurrent vector.
Definition: concurrent_vector.h:438
void _Copy(const void *_Src)
Definition: concurrent_vector.h:1494
iterator_traits< _InIt >::difference_type distance(_InIt _First, _InIt _Last)
Definition: xutility:755
_Container * _My_vector
Definition: concurrent_vector.h:178
_Vector_iterator & operator--()
Definition: concurrent_vector.h:284
_CRTIMP2 _Size_type _Internal_grow_to_at_least_with_result(_Size_type _New_size, _Size_type _Element_size, _My_internal_array_op2 _Init, const void *_Src)
concurrent_vector(concurrent_vector &&_Vector)
Constructs a concurrent vector.
Definition: concurrent_vector.h:603
void _Init(const void *_Src)
Definition: concurrent_vector.h:1489
const _Ty & const_reference
A type that provides a reference to a const element stored in a concurrent vector for reading and per...
Definition: concurrent_vector.h:463
concurrent_vector(size_type _N)
Constructs a concurrent vector.
Definition: concurrent_vector.h:628
_CRTIMP2 void _Internal_resize(_Size_type _New_size, _Size_type _Element_size, _Size_type _Max_size, _My_internal_array_op1 _Destroy, _My_internal_array_op2 _Init, const void *_Src)
static void __cdecl _Initialize_array_by(void *_Begin, const void *_Src, size_type _N)
Definition: concurrent_vector.h:1658
size_type max_size() const
Returns the maximum number of elements the concurrent vector can hold. This method is concurrency-saf...
Definition: concurrent_vector.h:1090
Definition: concurrent_vector.h:130
void shrink_to_fit()
Compacts the internal representation of the concurrent vector to reduce fragmentation and optimize me...
Definition: concurrent_vector.h:1529
reference back()
Returns a reference or a const reference to the last element in the concurrent vector. If the concurrent vector is empty, the return value is undefined. This method is concurrency-safe.
Definition: concurrent_vector.h:1295
reverse_iterator rbegin()
Returns an iterator of type reverse_iterator or const_reverse_iterator to the beginning of the conc...
Definition: concurrent_vector.h:1160
concurrent_vector< _Ty, _Ax > _Myt
Definition: concurrent_vector.h:421
size_t _Segment_index_t
Definition: concurrent_vector.h:68
void _Destroy(_Ty *_Ptr)
Definition: xmemory0:53
_In_ size_t _In_z_ const unsigned char * _Src
Definition: mbstring.h:95
_Allocator_base(const _Allocator_type &_Al=_Allocator_type())
Definition: concurrent_vector.h:391
_Vector_iterator & operator++()
Definition: concurrent_vector.h:264
_Value & operator[](ptrdiff_t _K) const
Definition: concurrent_vector.h:254
concurrent_vector & operator=(const concurrent_vector &_Vector)
Assigns the contents of another concurrent_vector object to this one. This method is not concurrency-...
Definition: concurrent_vector.h:713
_W64 int ptrdiff_t
Definition: crtdefs.h:530
void resize(size_type _N, const _Ty &_Val)
Changes the size of the concurrent vector to the requested size, deleting or adding elements as neces...
Definition: concurrent_vector.h:1078
_Ty & _Internal_subscript_with_exceptions(size_type _Index) const
Definition: concurrent_vector.h:1582
void internal_assign_iterators(_I _First, _I _Last)
Definition: concurrent_vector.h:1623
const_reference at(size_type _Index) const
Provides access to the element at the given index in the concurrent vector. This method is concurrenc...
Definition: concurrent_vector.h:954
_Size_type _Internal_grow_segment(const _Size_type _Start, _Size_type _Finish, _Size_type _Element_size, _Segment_t **_PPSegment, _Size_type *_PSegStart, _Size_type *_PSegFinish)
_Subatomic< _Size_type > _My_early_size
Definition: concurrent_vector.h:158
void * _Table[_Pointers_per_long_table]
Definition: concurrent_vector.h:133
iterator begin()
Returns an iterator of type iterator or const_iterator to the beginning of the concurrent vector...
Definition: concurrent_vector.h:1104
_CRTIMP2 void * _Internal_push_back(_Size_type _Element_size, _Size_type &_Index)
const_iterator cend() const
Returns an iterator of type const_iterator to the end of the concurrent vector. This method is concu...
Definition: concurrent_vector.h:1228
std::reverse_iterator< const_iterator > const_reverse_iterator
A type that provides a random-access iterator that can read any const element in the concurrent vecto...
Definition: concurrent_vector.h:501
_Value * _My_item
Definition: concurrent_vector.h:185
static void __cdecl _Assign_array(void *_Dst, const void *_Src, size_type _N)
Definition: concurrent_vector.h:1669
_Concurrent_vector_base_v4 _Concurrent_vector_base
Definition: concurrent_vector.h:170
::Concurrency::details::_Concurrent_vector_base_v4 & _Internal_vector_base()
Definition: concurrent_vector.h:1419
The concurrent_vector class is a sequence container class that allows random access to any element...
Definition: concurrent_vector.h:54
_Vector_iterator operator--(int)
Definition: concurrent_vector.h:313
void assign(_InputIterator _Begin, _InputIterator _End)
Erases the elements of the concurrent vector and assigns to it either _N copies of _Item ...
Definition: concurrent_vector.h:1371
_Concurrent_vector_base_v4()
Definition: concurrent_vector.h:94
_CRTIMP2 void * _Internal_compact(_Size_type _Element_size, void *_Table, _My_internal_array_op1 _Destroy, _My_internal_array_op2 _Copy)
void resize(size_type _N)
Changes the size of the concurrent vector to the requested size, deleting or adding elements as neces...
Definition: concurrent_vector.h:1053
_Vector_iterator< _Container, _Ty > operator+(ptrdiff_t _Offset, const _Vector_iterator< _Container, _Ty > &_Vec)
Definition: concurrent_vector.h:336
void(__cdecl * _My_internal_array_op1)(void *_Begin, _Size_type _N)
Definition: concurrent_vector.h:124
static void __cdecl _Copy_array(void *_Dst, const void *_Src, size_type _N)
Definition: concurrent_vector.h:1664
static void *__cdecl _Internal_allocator(::Concurrency::details::_Concurrent_vector_base_v4 &_Vb, size_t _K)
Definition: concurrent_vector.h:1423
iterator push_back(const_reference _Item)
Appends the given item to the end of the concurrent vector. This method is concurrency-safe.
Definition: concurrent_vector.h:836
static _Segment_index_t _Segment_base(_Segment_index_t _K)
Definition: concurrent_vector.h:106
_Vector_iterator & operator+=(ptrdiff_t _Offset)
Definition: concurrent_vector.h:230
const_reverse_iterator rbegin() const
Returns an iterator of type reverse_iterator or const_reverse_iterator to the beginning the concurr...
Definition: concurrent_vector.h:1188
static const _Segment_index_t _Default_initial_segments
Definition: concurrent_vector.h:72
Definition: concurrent_vector.h:1473
static const _Segment_index_t _Pointers_per_short_table
Definition: concurrent_vector.h:75
_Subatomic< _Size_type > _My_first_block
Definition: concurrent_vector.h:155
_Ty value_type
A type that represents the data type stored in a concurrent vector.
Definition: concurrent_vector.h:444
_CRTIMP2 void _Internal_assign(const _Concurrent_vector_base_v4 &_Src, _Size_type _Element_size, _My_internal_array_op1 _Destroy, _My_internal_array_op2 _Assign, _My_internal_array_op2 _Copy)
details::_Vector_iterator< concurrent_vector, const _Ty > const_iterator
A type that provides a random-access iterator that can read a const element in a concurrent vector...
Definition: concurrent_vector.h:488
const_iterator end() const
Returns an iterator of type iterator or const_iterator to the end of the concurrent vector...
Definition: concurrent_vector.h:1146
_Segment_t _My_storage[_Pointers_per_short_table]
Definition: concurrent_vector.h:90
size_t _My_index
Definition: concurrent_vector.h:181
Definition: concurrent_vector.h:79
void _Iterate(_It &_Src)
Definition: concurrent_vector.h:1504
void _Internal_free_segments(void *_Table[], _Segment_index_t _K, _Segment_index_t _First_block)
Definition: concurrent_vector.h:1546
void _Internal_assign(_I _First, _I _Last, _Is_integer_tag< false > *)
Definition: concurrent_vector.h:1450
friend _Vector_iterator< _C, _Ty > operator+(ptrdiff_t _Offset, const _Vector_iterator< _C, _Ty > &_Vec)
_Vector_iterator operator-(ptrdiff_t _Offset) const
Definition: concurrent_vector.h:236
#define _CRTIMP2
Definition: crtdefs.h:126
const_iterator cbegin() const
Returns an iterator of type const_iterator to the beginning of the concurrent vector. This method is concurrency-safe.
Definition: concurrent_vector.h:1215
const size_type _N
Definition: concurrent_vector.h:1477
const_reverse_iterator crbegin() const
Returns an iterator of type const_reverse_iterator to the beginning of the concurrent vector...
Definition: concurrent_vector.h:1241
const_reference back() const
Returns a reference or a const reference to the last element in the concurrent_vector. If the concurrent vector is empty, the return value is undefined. This method is concurrency-safe.
Definition: concurrent_vector.h:1310
bool operator>=(const concurrent_vector< _Ty, A1 > &_A, const concurrent_vector< _Ty, A2 > &_B)
Tests if the concurrent_vector object on the left side of the operator is greater than or equal to th...
Definition: concurrent_vector.h:1919
const_iterator begin() const
Returns an iterator of type iterator or const_iterator to the beginning of the concurrent vector...
Definition: concurrent_vector.h:1132
void reserve(size_type _N)
Allocates enough space to grow the concurrent vector to size _N without having to allocate more memo...
Definition: concurrent_vector.h:1019
Definition: concurrent_vector.h:384
const_reverse_iterator crend() const
Returns an iterator of type const_reverse_iterator to the end of the concurrent vector. This method is concurrency-safe.
Definition: concurrent_vector.h:1254
_Ty & _Internal_subscript(size_type _Index) const
Definition: concurrent_vector.h:1568
#define _BAD_ALLOC_MARKER
Definition: concurrent_vector.h:60
void operator=(const _Internal_loop_guide &)
ptrdiff_t difference_type
Definition: concurrent_vector.h:322
_Value & reference
Definition: concurrent_vector.h:325
details::_Concurrent_vector_base_v4::_Size_type size_type
A type that counts the number of elements in a concurrent vector.
Definition: concurrent_vector.h:432
bool operator>=(const _Vector_iterator< _Container, _Ty > &_I, const _Vector_iterator< _Container, _U > &_J)
Definition: concurrent_vector.h:366
bool operator>(const _Vector_iterator< _Container, _Ty > &_I, const _Vector_iterator< _Container, _U > &_J)
Definition: concurrent_vector.h:360
concurrent_vector & operator=(concurrent_vector &&_Vector)
Assigns the contents of another concurrent_vector object to this one. This method is not concurrency-...
Definition: concurrent_vector.h:754
concurrent_vector(const concurrent_vector< _Ty, M > &_Vector, const allocator_type &_Al=allocator_type())
Constructs a concurrent vector.
Definition: concurrent_vector.h:577
concurrent_vector & operator=(const concurrent_vector< _Ty, M > &_Vector)
Assigns the contents of another concurrent_vector object to this one. This method is not concurrency-...
Definition: concurrent_vector.h:734
friend bool operator==(const _Vector_iterator< _C, _Ty > &, const _Vector_iterator< _C, _U > &)
bool operator!=(const _Concurrent_queue_iterator< _C, _Ty > &_I, const _Concurrent_queue_iterator< _C, _U > &_J)
Definition: concurrent_queue.h:323
_CRTIMP2 _Size_type _Internal_grow_by(_Size_type _Delta, _Size_type _Element_size, _My_internal_array_op2 _Init, const void *_Src)
allocator_type get_allocator() const
Returns a copy of the allocator used to construct the concurrent vector. This method is concurrency-s...
Definition: concurrent_vector.h:1324
bool empty() const
Tests if the concurrent vector is empty at the time this method is called. This method is concurrency...
Definition: concurrent_vector.h:985
iterator grow_by(size_type _Delta, const_reference _Item)
Grows this concurrent vector by _Delta elements. This method is concurrency-safe.
Definition: concurrent_vector.h:798
static _CRTIMP2 _Segment_index_t __cdecl _Segment_index_of(_Size_type _Index)
_FwdIt const _Ty _Val
Definition: algorithm:1938
_Subatomic< _Segment_t * > _My_segment
Definition: concurrent_vector.h:161
bool operator>(const concurrent_vector< _Ty, A1 > &_A, const concurrent_vector< _Ty, A2 > &_B)
Tests if the concurrent_vector object on the left side of the operator is greater than the concurrent...
Definition: concurrent_vector.h:1843
static void __cdecl _Destroy_array(void *_Begin, size_type _N)
Definition: concurrent_vector.h:1678
bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2)
Definition: memory:830
_CRTIMP2 void _Internal_swap(_Concurrent_vector_base_v4 &)
_CRTIMP2 void _Internal_reserve(_Size_type _N, _Size_type _Element_size, _Size_type _Max_size)
ptrdiff_t operator-(const _Vector_iterator< _Container, _Ty > &_I, const _Vector_iterator< _Container, _U > &_J)
Definition: concurrent_vector.h:378
const_reference operator[](size_type _Index) const
Provides read access to element at the given index in the concurrent vector. This method is concurren...
Definition: concurrent_vector.h:904
friend class _Helper
Definition: concurrent_vector.h:166
std::reverse_iterator< iterator > reverse_iterator
A type that provides a random-access iterator that can read any element in a reversed concurrent vect...
Definition: concurrent_vector.h:495
_FwdIt _Last
Definition: algorithm:1936
void clear()
Erases all elements in the concurrent vector. This method is not concurrency-safe.
Definition: concurrent_vector.h:1402
size_type size() const
Returns the number of elements in the concurrent vector. This method is concurrency-safe.
Definition: concurrent_vector.h:971
_Ax::template rebind< _Ty >::other _Allocator_type
Definition: concurrent_vector.h:388
bool operator==(const _Tuple_type< _Rank > &_Lhs, const _Tuple_type< _Rank > &_Rhs) __GPU
Definition: amp.h:810
void _Internal_assign(size_type _N, const_reference _Item)
Definition: concurrent_vector.h:1597
std::random_access_iterator_tag iterator_category
Definition: concurrent_vector.h:326
iterator end()
Returns an iterator of type iterator or const_iterator to the end of the concurrent vector...
Definition: concurrent_vector.h:1118
reference front()
Returns a reference or a const reference to the first element in the concurrent vector. If the concurrent vector is empty, the return value is undefined. This method is concurrency-safe.
Definition: concurrent_vector.h:1267
concurrent_vector(_InputIterator _Begin, _InputIterator _End, const allocator_type &_Al=allocator_type())
Constructs a concurrent vector.
Definition: concurrent_vector.h:696
_Ty * pointer
A type that provides a pointer to an element in a concurrent vector.
Definition: concurrent_vector.h:469
_Allocator_type _My_allocator
Definition: concurrent_vector.h:389
_Segment_index_t _First_block
Definition: concurrent_vector.h:132