#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <type_traits>
#include <algorithm>
#include <utility>
#include <limits>
#include <climits>
#include <array>
#include <thread>
#include <carla/Exception.h>
命名空间 | |
namespace | moodycamel |
namespace | moodycamel::details |
宏定义 | |
#define | MOODYCAMEL_CATCH(...) catch(__VA_ARGS__) |
#define | MOODYCAMEL_DELETE_FUNCTION = delete |
#define | MOODYCAMEL_EXCEPTIONS_ENABLED |
#define | MOODYCAMEL_NOEXCEPT noexcept |
#define | MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) noexcept(expr) |
#define | MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) noexcept(expr) |
#define | MOODYCAMEL_RETHROW throw |
#define | MOODYCAMEL_THREADLOCAL thread_local |
#define | MOODYCAMEL_THROW(expr) ::carla::throw_exception(expr) |
#define | MOODYCAMEL_TRY try |
类型定义 | |
typedef ::moodycamel::ConsumerToken | consumer_token_t |
typedef Traits::index_t | index_t |
typedef ::moodycamel::ProducerToken | producer_token_t |
typedef Traits::size_t | size_t |
typedef std::max_align_t | moodycamel::details::std_max_align_t |
typedef std::uintptr_t | moodycamel::details::thread_id_t |
枚举 | |
enum | moodycamel::AllocationMode { moodycamel::CanAlloc , moodycamel::CannotAlloc } |
enum | moodycamel::InnerQueueContext { moodycamel::implicit_context = 0 , moodycamel::explicit_context = 1 } |
函数 | |
void | moodycamel::add_block_to_free_list (Block *block) |
void | moodycamel::add_blocks_to_free_list (Block *block) |
ProducerBase * | moodycamel::add_producer (ProducerBase *producer) |
template<typename U > | |
static char * | moodycamel::details::align_for (char *ptr) |
template<typename T > | |
static T | moodycamel::details::ceil_to_pow_2 (T x) |
template<typename T > | |
static bool | moodycamel::details::circular_less_than (T a, T b) |
ConcurrentQueue (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT | |
ConcurrentQueue (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION | |
ConcurrentQueue (size_t capacity=6 *BLOCK_SIZE) | |
ConcurrentQueue (size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers) | |
template<typename U > | |
static U * | moodycamel::create () |
template<typename U , typename A1 > | |
static U * | moodycamel::create (A1 &&a1) |
template<typename U > | |
static U * | moodycamel::create_array (size_t count) |
template<typename It > | |
static auto | moodycamel::details::deref_noexcept (It &it) MOODYCAMEL_NOEXCEPT -> decltype(*it) |
template<typename U > | |
static void | moodycamel::destroy (U *p) |
template<typename U > | |
static void | moodycamel::destroy_array (U *p, size_t count) |
bool | enqueue (producer_token_t const &token, T &&item) |
bool | enqueue (producer_token_t const &token, T const &item) |
bool | enqueue (T &&item) |
bool | enqueue (T const &item) |
template<typename It > | |
bool | enqueue_bulk (It itemFirst, size_t count) |
template<typename It > | |
bool | enqueue_bulk (producer_token_t const &token, It itemFirst, size_t count) |
ImplicitProducer * | moodycamel::get_or_add_implicit_producer () |
static size_t | moodycamel::details::hash_thread_id (thread_id_t id) |
template<AllocationMode canAlloc, typename U > | |
bool | moodycamel::inner_enqueue (producer_token_t const &token, U &&element) |
template<AllocationMode canAlloc, typename U > | |
bool | moodycamel::inner_enqueue (U &&element) |
template<AllocationMode canAlloc, typename It > | |
bool | moodycamel::inner_enqueue_bulk (It itemFirst, size_t count) |
template<AllocationMode canAlloc, typename It > | |
bool | moodycamel::inner_enqueue_bulk (producer_token_t const &token, It itemFirst, size_t count) |
static bool | moodycamel::is_lock_free () |
static bool | moodycamel::details::likely (bool x) |
template<typename T > | |
static T const & | moodycamel::details::nomove (T const &x) |
ConcurrentQueue & | operator= (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT |
ConcurrentQueue & | operator= (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION |
void | moodycamel::populate_initial_block_list (size_t blockCount) |
void | moodycamel::populate_initial_implicit_producer_hash () |
ProducerBase * | moodycamel::recycle_or_create_producer (bool isExplicit) |
ProducerBase * | moodycamel::recycle_or_create_producer (bool isExplicit, bool &recycled) |
void | moodycamel::reown_producers () |
template<AllocationMode canAlloc> | |
Block * | moodycamel::requisition_block () |
size_t | moodycamel::size_approx () const |
void | swap (ConcurrentQueue &other) MOODYCAMEL_NOEXCEPT |
template<typename T , typename Traits > | |
void | swap (ConcurrentQueue< T, Traits > &a, ConcurrentQueue< T, Traits > &b) MOODYCAMEL_NOEXCEPT |
void | swap (ConsumerToken &a, ConsumerToken &b) MOODYCAMEL_NOEXCEPT |
void | swap (ProducerToken &a, ProducerToken &b) MOODYCAMEL_NOEXCEPT |
template<typename T , typename Traits > | |
void | moodycamel::swap (typename ConcurrentQueue< T, Traits >::ImplicitProducerKVP &a, typename ConcurrentQueue< T, Traits >::ImplicitProducerKVP &b) MOODYCAMEL_NOEXCEPT |
template<typename T , typename Traits > | |
void | swap (typename ConcurrentQueue< T, Traits >::ImplicitProducerKVP &a, typename ConcurrentQueue< T, Traits >::ImplicitProducerKVP &b) MOODYCAMEL_NOEXCEPT |
void | moodycamel::swap_implicit_producer_hashes (ConcurrentQueue &other) |
ConcurrentQueue & | swap_internal (ConcurrentQueue &other) |
template<typename T > | |
static void | moodycamel::details::swap_relaxed (std::atomic< T > &left, std::atomic< T > &right) |
static thread_id_t | moodycamel::details::thread_id () |
template<typename U > | |
bool | try_dequeue (consumer_token_t &token, U &item) |
template<typename U > | |
bool | try_dequeue (U &item) |
template<typename It > | |
size_t | try_dequeue_bulk (consumer_token_t &token, It itemFirst, size_t max) |
template<typename It > | |
size_t | try_dequeue_bulk (It itemFirst, size_t max) |
template<typename T , typename Traits = ConcurrentQueueDefaultTraits> | |
class moodycamel::ConcurrentQueue | moodycamel::try_dequeue_bulk_from_producer (producer_token_t const &producer, It itemFirst, size_t max) |
template<typename U > | |
bool | try_dequeue_from_producer (producer_token_t const &producer, U &item) |
template<typename U > | |
bool | try_dequeue_non_interleaved (U &item) |
bool | try_enqueue (producer_token_t const &token, T &&item) |
bool | try_enqueue (producer_token_t const &token, T const &item) |
bool | try_enqueue (T &&item) |
bool | try_enqueue (T const &item) |
template<typename It > | |
bool | try_enqueue_bulk (It itemFirst, size_t count) |
template<typename It > | |
bool | try_enqueue_bulk (producer_token_t const &token, It itemFirst, size_t count) |
Block * | moodycamel::try_get_block_from_free_list () |
Block * | moodycamel::try_get_block_from_initial_pool () |
static bool | moodycamel::details::unlikely (bool x) |
bool | moodycamel::update_current_producer_after_rotation (consumer_token_t &token) |
~ConcurrentQueue () | |
#define MOODYCAMEL_CATCH | ( | ... | ) | catch(__VA_ARGS__) |
#define MOODYCAMEL_DELETE_FUNCTION = delete |
在文件 ConcurrentQueue.h 第 228 行定义.
#define MOODYCAMEL_EXCEPTIONS_ENABLED |
在文件 ConcurrentQueue.h 第 155 行定义.
#define MOODYCAMEL_NOEXCEPT noexcept |
在文件 ConcurrentQueue.h 第 202 行定义.
#define MOODYCAMEL_NOEXCEPT_ASSIGN | ( | type, | |
valueType, | |||
expr ) noexcept(expr) |
#define MOODYCAMEL_NOEXCEPT_CTOR | ( | type, | |
valueType, | |||
expr ) noexcept(expr) |
#define MOODYCAMEL_RETHROW throw |
#define MOODYCAMEL_THREADLOCAL thread_local |
在文件 ConcurrentQueue.h 第 142 行定义.
被这些函数引用 moodycamel::details::thread_id().
#define MOODYCAMEL_THROW | ( | expr | ) | ::carla::throw_exception(expr) |
在文件 ConcurrentQueue.h 第 173 行定义.
#define MOODYCAMEL_TRY try |
在文件 ConcurrentQueue.h 第 1343 行定义.
typedef Traits::index_t index_t |
在文件 ConcurrentQueue.h 第 1345 行定义.
在文件 ConcurrentQueue.h 第 1341 行定义.
typedef Traits::size_t size_t |
在文件 ConcurrentQueue.h 第 1347 行定义.
try_dequeue_bulk_from_producer::ConcurrentQueue | ( | ConcurrentQueue && | other | ) |
在文件 ConcurrentQueue.h 第 1509 行定义.
try_dequeue_bulk_from_producer::ConcurrentQueue | ( | ConcurrentQueue const & | ) |
|
explicit |
在文件 ConcurrentQueue.h 第 1403 行定义.
引用了 moodycamel::ExplicitProducer , 以及 moodycamel::ProducerToken::producer.
try_dequeue_bulk_from_producer::ConcurrentQueue | ( | size_t | minCapacity, |
size_t | maxExplicitProducers, | ||
size_t | maxImplicitProducers ) |
在文件 ConcurrentQueue.h 第 1427 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1624 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1615 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1605 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1594 行定义.
bool try_dequeue_bulk_from_producer::enqueue_bulk | ( | It | itemFirst, |
size_t | count ) |
在文件 ConcurrentQueue.h 第 1635 行定义.
bool try_dequeue_bulk_from_producer::enqueue_bulk | ( | producer_token_t const & | token, |
It | itemFirst, | ||
size_t | count ) |
在文件 ConcurrentQueue.h 第 1648 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1543 行定义.
引用了 moodycamel::FreeList< N >::add_knowing_refcount_is_zero().
ConcurrentQueue & try_dequeue_bulk_from_producer::operator= | ( | ConcurrentQueue const & | ) |
|
inline |
在文件 ConcurrentQueue.h 第 1553 行定义.
|
inline |
|
inline |
在文件 ConcurrentQueue.h 第 3764 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 3759 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 3770 行定义.
|
private |
bool try_dequeue_bulk_from_producer::try_dequeue | ( | consumer_token_t & | token, |
U & | item ) |
在文件 ConcurrentQueue.h 第 1777 行定义.
bool try_dequeue_bulk_from_producer::try_dequeue | ( | U & | item | ) |
在文件 ConcurrentQueue.h 第 1722 行定义.
size_t try_dequeue_bulk_from_producer::try_dequeue_bulk | ( | consumer_token_t & | token, |
It | itemFirst, | ||
size_t | max ) |
在文件 ConcurrentQueue.h 第 1841 行定义.
引用了 moodycamel::ExplicitProducer::BlockIndexEntry::block, BLOCK_SIZE, moodycamel::ProducerBase::headIndex, moodycamel::Block::next, moodycamel::ExplicitProducer::pr_blockIndexEntries, moodycamel::ExplicitProducer::pr_blockIndexFront, moodycamel::ExplicitProducer::pr_blockIndexSize, moodycamel::ExplicitProducer::pr_blockIndexSlotsUsed, moodycamel::ProducerBase::tailBlock , 以及 moodycamel::ProducerBase::tailIndex.
|
inline |
在文件 ConcurrentQueue.h 第 1911 行定义.
引用了 BLOCK_SIZE, moodycamel::ExplicitProducer::blockIndex, moodycamel::CannotAlloc, moodycamel::ProducerBase::headIndex, MAX_SUBQUEUE_SIZE, MOODYCAMEL_CATCH, MOODYCAMEL_NOEXCEPT_CTOR, MOODYCAMEL_RETHROW, MOODYCAMEL_TRY, moodycamel::ExplicitProducer::new_block_index(), moodycamel::Block::next, moodycamel::ProducerBase::parent, moodycamel::ExplicitProducer::pr_blockIndexFront, moodycamel::ExplicitProducer::pr_blockIndexRaw, moodycamel::ExplicitProducer::pr_blockIndexSize, moodycamel::ExplicitProducer::pr_blockIndexSlotsUsed, moodycamel::ProducerBase::tailBlock, moodycamel::ProducerBase::tailIndex , 以及 moodycamel::details::const_numeric_max< T >::value.
bool try_dequeue_bulk_from_producer::try_dequeue_non_interleaved | ( | U & | item | ) |
在文件 ConcurrentQueue.h 第 1762 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1686 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1678 行定义.
引用了 BLOCK_SIZE , 以及 moodycamel::Block::emptyFlags.
|
inline |
在文件 ConcurrentQueue.h 第 1669 行定义.
|
inline |
在文件 ConcurrentQueue.h 第 1658 行定义.
bool try_dequeue_bulk_from_producer::try_enqueue_bulk | ( | It | itemFirst, |
size_t | count ) |
在文件 ConcurrentQueue.h 第 1699 行定义.
bool try_dequeue_bulk_from_producer::try_enqueue_bulk | ( | producer_token_t const & | token, |
It | itemFirst, | ||
size_t | count ) |
在文件 ConcurrentQueue.h 第 1711 行定义.
try_dequeue_bulk_from_producer::~ConcurrentQueue | ( | ) |
在文件 ConcurrentQueue.h 第 1458 行定义.
在文件 ConcurrentQueue.h 第 1350 行定义.
被这些函数引用 moodycamel::ExplicitProducer::dequeue(), moodycamel::ExplicitProducer::dequeue_bulk(), moodycamel::ImplicitProducer::dequeue_bulk(), moodycamel::ImplicitProducer::enqueue(), moodycamel::ExplicitProducer::enqueue_bulk(), moodycamel::ImplicitProducer::enqueue_bulk(), moodycamel::ImplicitProducer::get_block_index_index_for_index(), moodycamel::Block::is_empty(), moodycamel::Block::operator[](), moodycamel::Block::operator[](), moodycamel::Block::reset_empty(), moodycamel::Block::set_empty(), moodycamel::Block::set_many_empty(), try_dequeue_bulk(), try_dequeue_from_producer(), try_enqueue() , 以及 moodycamel::ImplicitProducer::~ImplicitProducer().
|
static |
在文件 ConcurrentQueue.h 第 1360 行定义.
|
static |
在文件 ConcurrentQueue.h 第 1354 行定义.
|
static |
在文件 ConcurrentQueue.h 第 1356 行定义.
|
static |