|
dispenso 1.6.2
A library for task parallelism
|
#include <concurrent_vector.h>
Public Member Functions | |
| ConcurrentVector () | |
| ConcurrentVector (size_t startCapacity, ReserveTagS) | |
| ConcurrentVector (size_t startSize) | |
| ConcurrentVector (size_t startSize, const T &defaultValue) | |
| template<typename InIterator , typename = cv::EnableIfInputIterator<InIterator>> | |
| ConcurrentVector (InIterator start, InIterator end) | |
| template<typename InIterator , typename = cv::EnableIfInputIterator<InIterator>> | |
| ConcurrentVector (size_type startSize, InIterator start, InIterator end) | |
| ConcurrentVector (std::initializer_list< T > l) | |
| ConcurrentVector (const ConcurrentVector &other) | |
| ConcurrentVector (ConcurrentVector &&other) | |
| void | assign (size_type count, const T &value) |
| template<typename It , typename = typename std::iterator_traits<It>::difference_type, typename = typename std::iterator_traits<It>::pointer, typename = typename std::iterator_traits<It>::reference, typename = typename std::iterator_traits<It>::value_type, typename = typename std::iterator_traits<It>::iterator_category> | |
| void | assign (It start, It end) |
| void | reserve (difference_type capacity) |
| void | resize (difference_type len) |
| void | resize (difference_type len, const T &value) |
| size_type | default_capacity () const |
| size_type | capacity () const |
| void | clear () |
| void | shrink_to_fit () |
| ~ConcurrentVector () | |
| iterator | insert (const_iterator pos, const T &value) |
| iterator | insert (const_iterator pos, T &&value) |
| iterator | insert (const_iterator pos, size_type count, const T &value) |
| template<typename InputIt , typename = typename std::iterator_traits<InputIt>::difference_type, typename = typename std::iterator_traits<InputIt>::pointer, typename = typename std::iterator_traits<InputIt>::reference, typename = typename std::iterator_traits<InputIt>::value_type, typename = typename std::iterator_traits<InputIt>::iterator_category> | |
| iterator | insert (const_iterator pos, InputIt first, InputIt last) |
| iterator | insert (const_iterator pos, std::initializer_list< T > ilist) |
| iterator | erase (const_iterator pos) |
| iterator | erase (const_iterator first, const_iterator last) |
| iterator | push_back (const T &val) |
| iterator | push_back (T &&val) |
| template<typename... Args> | |
| iterator | emplace_back (Args &&... args) |
| template<typename Gen > | |
| iterator | grow_by_generator (size_type delta, Gen gen) |
| iterator | grow_by (size_type delta, const T &t) |
| iterator | grow_by (size_type delta) |
| template<typename It , typename = typename std::iterator_traits<It>::difference_type, typename = typename std::iterator_traits<It>::pointer, typename = typename std::iterator_traits<It>::reference, typename = typename std::iterator_traits<It>::value_type, typename = typename std::iterator_traits<It>::iterator_category> | |
| iterator | grow_by (It start, It end) |
| iterator | grow_by (std::initializer_list< T > initList) |
| iterator | grow_to_at_least (size_type n) |
| iterator | grow_to_at_least (size_type n, const T &t) |
| void | pop_back () |
| const T & | at (size_type index) const |
| T & | at (size_type index) |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| reverse_iterator | rbegin () |
| reverse_iterator | rend () |
| const_reverse_iterator | rbegin () const |
| const_reverse_iterator | rend () const |
| bool | empty () const |
| constexpr size_type | max_size () const noexcept |
| size_type | size () const |
| T & | front () |
| const T & | front () const |
| T & | back () |
| const T & | back () const |
A concurrent vector type. It is safe to call .push_back(), .emplace_back(), the various .grow_() functions, .begin(), .end(), .size(), .empty() concurrently, and existing iterators and references remain valid with these functions' use.
Definition at line 188 of file concurrent_vector.h.
|
inline |
Default construct the ConcurrentVector.
Definition at line 213 of file concurrent_vector.h.
|
inline |
The reserving constructor. By supplying a reasonable starting capacity, e.g. close to max expected vector size, this can often improve performance substantially by reducing allocations and increasing data coherency.
Definition at line 220 of file concurrent_vector.h.
|
inlineexplicit |
Sizing constructor with default initialization.
Definition at line 236 of file concurrent_vector.h.
|
inline |
Sizing constructor with specified default value.
Definition at line 247 of file concurrent_vector.h.
|
inline |
Constructor taking an iterator range.
Definition at line 260 of file concurrent_vector.h.
|
inline |
Sizing constructor taking an iterator range. If size is known in advance, this may be faster than just providing the iterator range, especially for input iterators that are not random access. The range must contain exactly startSize elements.
Definition at line 269 of file concurrent_vector.h.
|
inline |
Construct via initializer list
Definition at line 278 of file concurrent_vector.h.
|
inline |
Copy constructor
Definition at line 284 of file concurrent_vector.h.
|
inline |
Move constructor
Definition at line 290 of file concurrent_vector.h.
|
inline |
Destruct the vector.
Definition at line 507 of file concurrent_vector.h.
|
inline |
Assign the vector. Not concurrency safe.
| start | The beginning of the iterator range to assign into the vector |
| end | The end of the iterator range to assign into the vector |
Definition at line 372 of file concurrent_vector.h.
|
inline |
Assign the vector. Not concurrency safe.
| count | The number of elements to have in the vector |
| value | The value to copy into each element |
Definition at line 350 of file concurrent_vector.h.
|
inline |
Access an element of the vector. Out-of-boundes accesses generate an exception. Concurrency safe.
| index | The index of the element to access. |
Definition at line 838 of file concurrent_vector.h.
|
inline |
Access an element of the vector. Out-of-boundes accesses generate an exception. Concurrency safe.
| index | The index of the element to access. |
Definition at line 820 of file concurrent_vector.h.
|
inline |
Get the last element of the vector. Concurrency safe.
Definition at line 1016 of file concurrent_vector.h.
|
inline |
Get the last element of the vector. Concurrency safe.
Definition at line 1025 of file concurrent_vector.h.
|
inline |
Get an iterator to the start of the vector. Concurrency safe.
Definition at line 854 of file concurrent_vector.h.
|
inline |
Get an iterator to the start of the vector. Concurrency safe.
Definition at line 879 of file concurrent_vector.h.
|
inline |
The current capacity of the vector. Not concurrency safe.
Definition at line 440 of file concurrent_vector.h.
|
inline |
Get an iterator to the start of the vector. Concurrency safe.
Definition at line 904 of file concurrent_vector.h.
|
inline |
Get an iterator to the end of the vector. Concurrency safe.
Definition at line 916 of file concurrent_vector.h.
|
inline |
Clear the vector. This does not deallocate buffers, but just ensures that all elements are destructed. Size will be zero after the call. Not concurrency safe.
Definition at line 455 of file concurrent_vector.h.
|
inline |
The default capacity of this vector.
Definition at line 432 of file concurrent_vector.h.
|
inline |
Push a value onto the end of the vector. Concurrency safe.
| args | The arg pack used to construct the new element. |
Definition at line 659 of file concurrent_vector.h.
|
inline |
Checks if the vector contains any elements. Concurrency safe.
Definition at line 973 of file concurrent_vector.h.
|
inline |
Get an iterator to the end of the vector. Concurrency safe.
Definition at line 866 of file concurrent_vector.h.
|
inline |
Get an iterator to the end of the vector. Concurrency safe.
Definition at line 891 of file concurrent_vector.h.
|
inline |
Erase a range of elements. Not concurrency safe.
| first | The starting point of erasure. |
| last | The ending point of erasure. |
Definition at line 613 of file concurrent_vector.h.
|
inline |
Erase one element. Not concurrency safe.
| pos | The point of erasure. |
Definition at line 586 of file concurrent_vector.h.
|
inline |
Get the front element of the vector. Concurrency safe.
Definition at line 999 of file concurrent_vector.h.
|
inline |
Get the front element of the vector. Concurrency safe.
Definition at line 1007 of file concurrent_vector.h.
|
inline |
Grow the vector with an input iterator range. Concurrency safe.
| start | The start of the input iterator range. |
| end | The end of the input iterator range. |
Definition at line 732 of file concurrent_vector.h.
|
inline |
Grow the vector, default initializing new elements. Concurrency safe.
| delta | The number of elements to grow by. |
Definition at line 713 of file concurrent_vector.h.
|
inline |
Grow the vector, copying the provided value into new elements. Concurrency safe.
| delta | The number of elements to grow by. |
| t | The value to copy into all new elements. |
Definition at line 702 of file concurrent_vector.h.
|
inline |
Grow the vector with an initializer_list. Concurrency safe.
| initList | The initializer_list to use to initialize the newly added range. |
Definition at line 741 of file concurrent_vector.h.
|
inline |
Grow the vector, constructing new elements via a generator. Concurrency safe.
| delta | The number of elements to grow by. |
| gen | The generator to use to construct new elements. Must have operator()() and return a valid T. |
Definition at line 690 of file concurrent_vector.h.
|
inline |
Grow the vector to at least the desired size, default initializing new elements. Concurrency safe.
| n | The required length |
Definition at line 751 of file concurrent_vector.h.
|
inline |
Grow the vector to at least the desired size, copying the provided value into new elements. Concurrency safe.
| n | The required length |
| t | The value to copy into each new element. |
Definition at line 766 of file concurrent_vector.h.
|
inline |
Insert a value. Not concurrency safe.
| pos | The point of insertion. |
| value | The value to copy into the element at pos. |
Definition at line 519 of file concurrent_vector.h.
|
inline |
Insert a range of values. Not concurrency safe.
| pos | The point of insertion. |
| first | The start of the input iterator range. |
| last | The end of the input iterator range. |
Definition at line 566 of file concurrent_vector.h.
|
inline |
Insert a value. Not concurrency safe.
| pos | The point of insertion. |
| count | The number of elements to insert. |
| value | The value to copy into each inserted element starting at pos. |
Definition at line 546 of file concurrent_vector.h.
|
inline |
Insert an initializer_list. Not concurrency safe.
| pos | The point of insertion. |
| ilist | The initializer_list. |
Definition at line 576 of file concurrent_vector.h.
|
inline |
Insert a value. Not concurrency safe.
| pos | The point of insertion. |
| value | The value to move into the element at pos. |
Definition at line 533 of file concurrent_vector.h.
|
inlineconstexprnoexcept |
Get the maximum size a vector of this type can theoretically have. Concurrency safe (constexpr).
Definition at line 982 of file concurrent_vector.h.
|
inline |
Pop the last element off the vector. Not concurrency safe.
Definition at line 777 of file concurrent_vector.h.
|
inline |
Push a value onto the end of the vector. Concurrency safe.
| val | The value to copy into the new element. |
Definition at line 640 of file concurrent_vector.h.
|
inline |
Push a value onto the end of the vector. Concurrency safe.
| val | The value to move into the new element. |
Definition at line 649 of file concurrent_vector.h.
|
inline |
Get a starting reverse iterator to the vector. Concurrency safe.
Definition at line 930 of file concurrent_vector.h.
|
inline |
Get a starting reverse iterator to the vector. Concurrency safe.
Definition at line 953 of file concurrent_vector.h.
|
inline |
Get an ending reverse iterator to the vector. Concurrency safe.
Definition at line 941 of file concurrent_vector.h.
|
inline |
Get an ending reverse iterator to the vector. Concurrency safe.
Definition at line 964 of file concurrent_vector.h.
|
inline |
Reserve some capacity for the vector. Not concurrency safe.
| capacity | The amount of space to ensure is available to avoid further allocations. |
Definition at line 382 of file concurrent_vector.h.
|
inline |
Resize the vector, using default initialization for any new values. Not concurrency safe.
| len | The length of the vector after the resize. |
Definition at line 392 of file concurrent_vector.h.
|
inline |
Resize the vector, copying the provided value into any new elements. Not concurrency safe.
| len | The length of the vector after the resize. |
| value | The value to copy into any new elements. |
Definition at line 413 of file concurrent_vector.h.
|
inline |
Gets rid of extra capacity that is not needed to maintain preconditions. At least the default capacity will remain, even if the size of the vector is zero. Not concurrency safe.
Definition at line 484 of file concurrent_vector.h.
|
inline |
Get the size of the vector. Concurrency safe.
Definition at line 991 of file concurrent_vector.h.