template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
class Concurrency::concurrent_priority_queue< _Ty, _Compare, _Ax >
The concurrent_priority_queue
class is a container that allows multiple threads to concurrently push and pop items. Items are popped in priority order where priority is determined by a functor supplied as a template argument.
- Template Parameters
-
_Ty | The data type of the elements to be stored in the priority queue. |
_Compare | The type of the function object that can compare two element values as sort keys to determine their relative order in the priority queue. This argument is optional and the binary predicate less< _Ty > is the default value. |
_Ax | The type that represents the stored allocator object that encapsulates details about the allocation and deallocation of memory for the concurrent priority queue. This argument is optional and the default value is allocator< _Ty > . |
For detailed information on the concurrent_priority_queue
class, see Parallel Containers and Objects.
- See also
- Parallel Containers and Objects
template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
Constructs a concurrent priority queue.
- Parameters
-
_Al | The allocator class to use with this object. |
All constructors store an allocator object _Al and initialize the priority queue.
The first constructor specifies an empty initial priority queue and optionally specifies an allocator.
The second constructor specifies a priority queue with an initial capacity _Init_capacity and optionally specifies an allocator.
The third constructor specifies values supplied by the iterator range [_Begin , _End ) and optionally specifies an allocator.
The fourth and fifth constructors specify a copy of the priority queue _Src .
The sixth and seventh constructors specify a move of the priority queue _Src .
std::vector< value_type, allocator_type > _M_data
Definition: concurrent_priority_queue.h:641
::Concurrency::details::_Aggregator< _Cpq_operation, _My_functor_type > _M_my_aggregator
Definition: concurrent_priority_queue.h:608
volatile size_type _M_size
Definition: concurrent_priority_queue.h:618
size_type _M_mark
Definition: concurrent_priority_queue.h:614
template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
Constructs a concurrent priority queue.
- Parameters
-
All constructors store an allocator object _Al and initialize the priority queue.
The first constructor specifies an empty initial priority queue and optionally specifies an allocator.
The second constructor specifies a priority queue with an initial capacity _Init_capacity and optionally specifies an allocator.
The third constructor specifies values supplied by the iterator range [_Begin , _End ) and optionally specifies an allocator.
The fourth and fifth constructors specify a copy of the priority queue _Src .
The sixth and seventh constructors specify a move of the priority queue _Src .
266 _M_data.reserve(_Init_capacity);
std::vector< value_type, allocator_type > _M_data
Definition: concurrent_priority_queue.h:641
::Concurrency::details::_Aggregator< _Cpq_operation, _My_functor_type > _M_my_aggregator
Definition: concurrent_priority_queue.h:608
volatile size_type _M_size
Definition: concurrent_priority_queue.h:618
size_type _M_mark
Definition: concurrent_priority_queue.h:614
template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
template<typename _InputIterator >
Constructs a concurrent priority queue.
- Template Parameters
-
_InputIterator | The type of the input iterator. |
- Parameters
-
_Begin | The position of the first element in the range of elements to be copied. |
_End | The position of the first element beyond the range of elements to be copied. |
_Al | The allocator class to use with this object. |
All constructors store an allocator object _Al and initialize the priority queue.
The first constructor specifies an empty initial priority queue and optionally specifies an allocator.
The second constructor specifies a priority queue with an initial capacity _Init_capacity and optionally specifies an allocator.
The third constructor specifies values supplied by the iterator range [_Begin , _End ) and optionally specifies an allocator.
The fourth and fifth constructors specify a copy of the priority queue _Src .
The sixth and seventh constructors specify a move of the priority queue _Src .
std::vector< value_type, allocator_type > _M_data
Definition: concurrent_priority_queue.h:641
::Concurrency::details::_Aggregator< _Cpq_operation, _My_functor_type > _M_my_aggregator
Definition: concurrent_priority_queue.h:608
volatile size_type _M_size
Definition: concurrent_priority_queue.h:618
size_type _M_mark
Definition: concurrent_priority_queue.h:614
void _Heapify()
Merge unsorted elements into heap.
Definition: concurrent_priority_queue.h:755
template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
Constructs a concurrent priority queue.
- Parameters
-
All constructors store an allocator object _Al and initialize the priority queue.
The first constructor specifies an empty initial priority queue and optionally specifies an allocator.
The second constructor specifies a priority queue with an initial capacity _Init_capacity and optionally specifies an allocator.
The third constructor specifies values supplied by the iterator range [_Begin , _End ) and optionally specifies an allocator.
The fourth and fifth constructors specify a copy of the priority queue _Src .
The sixth and seventh constructors specify a move of the priority queue _Src .
std::vector< value_type, allocator_type > _M_data
Definition: concurrent_priority_queue.h:641
::Concurrency::details::_Aggregator< _Cpq_operation, _My_functor_type > _M_my_aggregator
Definition: concurrent_priority_queue.h:608
volatile size_type _M_size
Definition: concurrent_priority_queue.h:618
size_type _M_mark
Definition: concurrent_priority_queue.h:614
void _Heapify()
Merge unsorted elements into heap.
Definition: concurrent_priority_queue.h:755
template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
Constructs a concurrent priority queue.
- Parameters
-
_Src | The source concurrent_priority_queue object to copy or move elements from. |
_Al | The allocator class to use with this object. |
All constructors store an allocator object _Al and initialize the priority queue.
The first constructor specifies an empty initial priority queue and optionally specifies an allocator.
The second constructor specifies a priority queue with an initial capacity _Init_capacity and optionally specifies an allocator.
The third constructor specifies values supplied by the iterator range [_Begin , _End ) and optionally specifies an allocator.
The fourth and fifth constructors specify a copy of the priority queue _Src .
The sixth and seventh constructors specify a move of the priority queue _Src .
349 :
_M_mark(_Src._M_mark),
_M_data(_Src._M_data.begin(), _Src._M_data.end(), _Al)
std::vector< value_type, allocator_type > _M_data
Definition: concurrent_priority_queue.h:641
::Concurrency::details::_Aggregator< _Cpq_operation, _My_functor_type > _M_my_aggregator
Definition: concurrent_priority_queue.h:608
volatile size_type _M_size
Definition: concurrent_priority_queue.h:618
size_type _M_mark
Definition: concurrent_priority_queue.h:614
void _Heapify()
Merge unsorted elements into heap.
Definition: concurrent_priority_queue.h:755
template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
Constructs a concurrent priority queue.
- Parameters
-
All constructors store an allocator object _Al and initialize the priority queue.
The first constructor specifies an empty initial priority queue and optionally specifies an allocator.
The second constructor specifies a priority queue with an initial capacity _Init_capacity and optionally specifies an allocator.
The third constructor specifies values supplied by the iterator range [_Begin , _End ) and optionally specifies an allocator.
The fourth and fifth constructors specify a copy of the priority queue _Src .
The sixth and seventh constructors specify a move of the priority queue _Src .
std::vector< value_type, allocator_type > _M_data
Definition: concurrent_priority_queue.h:641
::Concurrency::details::_Aggregator< _Cpq_operation, _My_functor_type > _M_my_aggregator
Definition: concurrent_priority_queue.h:608
volatile size_type _M_size
Definition: concurrent_priority_queue.h:618
size_type _M_mark
Definition: concurrent_priority_queue.h:614
void _Heapify()
Merge unsorted elements into heap.
Definition: concurrent_priority_queue.h:755
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<typename _Ty, typename _Compare = std::less<_Ty>, typename _Ax = std::allocator<_Ty>>
Constructs a concurrent priority queue.
- Parameters
-
_Src | The source concurrent_priority_queue object to copy or move elements from. |
_Al | The allocator class to use with this object. |
All constructors store an allocator object _Al and initialize the priority queue.
The first constructor specifies an empty initial priority queue and optionally specifies an allocator.
The second constructor specifies a priority queue with an initial capacity _Init_capacity and optionally specifies an allocator.
The third constructor specifies values supplied by the iterator range [_Begin , _End ) and optionally specifies an allocator.
The fourth and fifth constructors specify a copy of the priority queue _Src .
The sixth and seventh constructors specify a move of the priority queue _Src .
std::vector< value_type, allocator_type > _M_data
Definition: concurrent_priority_queue.h:641
::Concurrency::details::_Aggregator< _Cpq_operation, _My_functor_type > _M_my_aggregator
Definition: concurrent_priority_queue.h:608
volatile size_type _M_size
Definition: concurrent_priority_queue.h:618
size_type _M_mark
Definition: concurrent_priority_queue.h:614
void _Heapify()
Merge unsorted elements into heap.
Definition: concurrent_priority_queue.h:755
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290