27 #ifndef EMBB_CONTAINERS_WAIT_FREE_ARRAY_VALUE_POOL_H_ 28 #define EMBB_CONTAINERS_WAIT_FREE_ARRAY_VALUE_POOL_H_ 30 #include <embb/base/atomic.h> 31 #include <embb/base/memory_allocation.h> 36 namespace containers {
145 template<
typename Type,
153 Allocator allocator_;
168 std::forward_iterator_tag, std::pair<int, Type> > {
279 template<
typename ForwardIterator>
281 ForwardIterator first,
342 #include <embb/containers/internal/wait_free_array_value_pool-inl.h> 344 #endif // EMBB_CONTAINERS_WAIT_FREE_ARRAY_VALUE_POOL_H_ Definition: lock_free_mpmc_queue.h:40
bool operator!=(Iterator const &rhs)
Compares two iterators for inequality.
static size_t GetMinimumElementCountForGuaranteedCapacity(size_t capacity)
Due to concurrency effects, a pool might provide less elements than managed by it.
Forward iterator to iterate over the allocated elements of the pool.
Definition: wait_free_array_value_pool.h:167
Allocator according to the C++ standard.
Definition: memory_allocation.h:525
Iterator()
Constructs an invalid iterator.
~WaitFreeArrayValuePool()
Destructs the pool.
Iterator & operator=(Iterator const &other)
Copies an iterator.
Wait-free value pool using array construction.
Definition: wait_free_array_value_pool.h:148
int Allocate(Type &element)
Allocates an element from the pool.
bool operator==(Iterator const &rhs)
Compares two iterators for equality.
Iterator & operator++()
Pre-increments an iterator.
void Free(Type element, int index)
Returns an element to the pool.
std::pair< int, Type > operator*()
Dereferences the iterator.
Iterator Begin()
Gets a forward iterator to the first allocated element in the pool.
Iterator End()
Gets a forward iterator pointing after the last allocated element in the pool.