#include <spsc_queue.hpp>
Public Member Functions | |
runtime_sized_ringbuffer (size_type max_elements) | |
template<typename U > | |
runtime_sized_ringbuffer (typename Alloc::template rebind< U >::other const &alloc, size_type max_elements) | |
runtime_sized_ringbuffer (Alloc const &alloc, size_type max_elements) | |
~runtime_sized_ringbuffer (void) | |
bool | push (T const &t) |
template<typename Functor > | |
bool | consume_one (Functor &f) |
template<typename Functor > | |
bool | consume_one (Functor const &f) |
template<typename Functor > | |
size_type | consume_all (Functor &f) |
template<typename Functor > | |
size_type | consume_all (Functor const &f) |
size_type | push (T const *t, size_type size) |
template<size_type size> | |
size_type | push (T const (&t)[size]) |
template<typename ConstIterator > | |
ConstIterator | push (ConstIterator begin, ConstIterator end) |
size_type | pop (T *ret, size_type size) |
template<typename OutputIterator > | |
size_type | pop_to_output_iterator (OutputIterator it) |
const T & | front (void) const |
T & | front (void) |
void | reset (void) |
reset the ringbuffer More... | |
bool | empty (void) |
Check if the ringbuffer is empty. More... | |
bool | is_lock_free (void) const |
Protected Member Functions | |
size_type | max_number_of_elements () const |
size_t | read_available (size_t max_size) const |
size_t | write_available (size_t max_size) const |
bool | push (T const &t, T *buffer, size_t max_size) |
size_t | push (const T *input_buffer, size_t input_count, T *internal_buffer, size_t max_size) |
template<typename ConstIterator > | |
ConstIterator | push (ConstIterator begin, ConstIterator end, T *internal_buffer, size_t max_size) |
template<typename Functor > | |
bool | consume_one (Functor &functor, T *buffer, size_t max_size) |
template<typename Functor > | |
bool | consume_one (Functor const &functor, T *buffer, size_t max_size) |
template<typename Functor > | |
size_t | consume_all (Functor const &functor, T *internal_buffer, size_t max_size) |
template<typename Functor > | |
size_t | consume_all (Functor &functor, T *internal_buffer, size_t max_size) |
size_t | pop (T *output_buffer, size_t output_count, T *internal_buffer, size_t max_size) |
template<typename OutputIterator > | |
size_t | pop_to_output_iterator (OutputIterator it, T *internal_buffer, size_t max_size) |
const T & | front (const T *internal_buffer) const |
T & | front (T *internal_buffer) |
Static Protected Member Functions | |
static size_t | next_index (size_t arg, size_t max_size) |
static size_t | read_available (size_t write_index, size_t read_index, size_t max_size) |
static size_t | write_available (size_t write_index, size_t read_index, size_t max_size) |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
References boost::out, boost::lockfree::detail::runtime_sized_ringbuffer< T, Alloc >::pop(), and T.
|
inlineprotectedinherited |
References boost::memory_order_acquire, boost::memory_order_relaxed, boost::memory_order_release, and boost::lockfree::detail::ringbuffer_base< T >::read_available().
Referenced by boost::lockfree::detail::compile_time_sized_ringbuffer< T, MaxSize >::consume_all(), and boost::lockfree::detail::runtime_sized_ringbuffer< T, Alloc >::consume_all().
|
inlineprotectedinherited |
|
inline |
|
inline |
|
inlineprotectedinherited |
References boost::lockfree::detail::ringbuffer_base< T >::empty(), boost::memory_order_acquire, boost::memory_order_relaxed, boost::memory_order_release, boost::next(), boost::lockfree::detail::ringbuffer_base< T >::next_index(), and T.
Referenced by boost::lockfree::detail::compile_time_sized_ringbuffer< T, MaxSize >::consume_one(), and boost::lockfree::detail::runtime_sized_ringbuffer< T, Alloc >::consume_one().
|
inlineprotectedinherited |
|
inline |
|
inline |
|
inlineinherited |
Check if the ringbuffer is empty.
References boost::memory_order_relaxed.
Referenced by boost::lockfree::detail::ringbuffer_base< T >::consume_one().
|
inlineprotectedinherited |
|
inlineprotectedinherited |
References boost::memory_order_relaxed.
|
inline |
|
inline |
|
inlineinherited |
|
inlineprotected |
|
inlinestaticprotectedinherited |
|
inlineprotectedinherited |
References boost::memory_order_acquire, boost::memory_order_relaxed, boost::memory_order_release, boost::accumulators::extract::min, and boost::lockfree::detail::ringbuffer_base< T >::read_available().
Referenced by boost::lockfree::detail::compile_time_sized_ringbuffer< T, MaxSize >::pop(), boost::lockfree::detail::runtime_sized_ringbuffer< T, Alloc >::pop(), and boost::lockfree::detail::ringbuffer_base< T >::reset().
|
inline |
|
inlineprotectedinherited |
References boost::memory_order_acquire, boost::memory_order_relaxed, boost::memory_order_release, and boost::lockfree::detail::ringbuffer_base< T >::read_available().
Referenced by boost::lockfree::detail::compile_time_sized_ringbuffer< T, MaxSize >::pop_to_output_iterator(), and boost::lockfree::detail::runtime_sized_ringbuffer< T, Alloc >::pop_to_output_iterator().
|
inline |
|
inlineprotectedinherited |
References boost::memory_order_acquire, boost::memory_order_relaxed, boost::memory_order_release, boost::next(), boost::lockfree::detail::ringbuffer_base< T >::next_index(), and T.
Referenced by boost::lockfree::detail::ringbuffer_base< T >::push(), boost::lockfree::detail::compile_time_sized_ringbuffer< T, MaxSize >::push(), and boost::lockfree::detail::runtime_sized_ringbuffer< T, Alloc >::push().
|
inlineprotectedinherited |
References boost::asio::begin, boost::fusion::distance(), boost::last, boost::memory_order_acquire, boost::memory_order_relaxed, boost::memory_order_release, boost::accumulators::extract::min, boost::next(), boost::cb_details::uninitialized_copy(), and boost::lockfree::detail::ringbuffer_base< T >::write_available().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotectedinherited |
|
inlineinherited |
reset the ringbuffer
References boost::memory_order_relaxed, boost::memory_order_release, boost::lockfree::detail::ringbuffer_base< T >::pop(), and T.
|
inlineprotectedinherited |