concurrency

#include <hpx/concurrency/itt_notify.hpp>

Defines

HPX_ITT_SYNC_CREATE(obj, type, name)
HPX_ITT_SYNC_RENAME(obj, name)
HPX_ITT_SYNC_PREPARE(obj)
HPX_ITT_SYNC_CANCEL(obj)
HPX_ITT_SYNC_ACQUIRED(obj)
HPX_ITT_SYNC_RELEASING(obj)
HPX_ITT_SYNC_RELEASED(obj)
HPX_ITT_SYNC_DESTROY(obj)
HPX_ITT_STACK_CREATE(ctx)
HPX_ITT_STACK_CALLEE_ENTER(ctx)
HPX_ITT_STACK_CALLEE_LEAVE(ctx)
HPX_ITT_STACK_DESTROY(ctx)
HPX_ITT_FRAME_BEGIN(frame, id)
HPX_ITT_FRAME_END(frame, id)
HPX_ITT_MARK_CREATE(mark, name)
HPX_ITT_MARK_OFF(mark)
HPX_ITT_MARK(mark, parameter)
HPX_ITT_THREAD_SET_NAME(name)
HPX_ITT_THREAD_IGNORE()
HPX_ITT_TASK_BEGIN(domain, name)
HPX_ITT_TASK_BEGIN_ID(domain, id, name)
HPX_ITT_TASK_END(domain)
HPX_ITT_DOMAIN_CREATE(name)
HPX_ITT_STRING_HANDLE_CREATE(name)
HPX_ITT_MAKE_ID(addr, extra)
HPX_ITT_ID_CREATE(domain, id)
HPX_ITT_ID_DESTROY(id)
HPX_ITT_HEAP_FUNCTION_CREATE(name, domain)
HPX_ITT_HEAP_ALLOCATE_BEGIN(f, size, initialized)
HPX_ITT_HEAP_ALLOCATE_END(f, addr, size, initialized)
HPX_ITT_HEAP_FREE_BEGIN(f, addr)
HPX_ITT_HEAP_FREE_END(f, addr)
HPX_ITT_HEAP_REALLOCATE_BEGIN(f, addr, new_size, initialized)
HPX_ITT_HEAP_REALLOCATE_END(f, addr, new_addr, new_size, initialized)
HPX_ITT_HEAP_INTERNAL_ACCESS_BEGIN()
HPX_ITT_HEAP_INTERNAL_ACCESS_END()
HPX_ITT_COUNTER_CREATE(name, domain)
HPX_ITT_COUNTER_CREATE_TYPED(name, domain, type)
HPX_ITT_COUNTER_SET_VALUE(id, value_ptr)
HPX_ITT_COUNTER_DESTROY(id)
HPX_ITT_METADATA_ADD(domain, id, key, data)

Typedefs

typedef void *__itt_heap_function

Functions

void itt_sync_create(void *, const char *, const char *)
void itt_sync_rename(void *, const char *)
void itt_sync_prepare(void *)
void itt_sync_acquired(void *)
void itt_sync_cancel(void *)
void itt_sync_releasing(void *)
void itt_sync_released(void *)
void itt_sync_destroy(void *)
___itt_caller *itt_stack_create()
void itt_stack_enter(___itt_caller *)
void itt_stack_leave(___itt_caller *)
void itt_stack_destroy(___itt_caller *)
void itt_frame_begin(___itt_domain const *, ___itt_id *)
void itt_frame_end(___itt_domain const *, ___itt_id *)
int itt_mark_create(char const *)
void itt_mark_off(int)
void itt_mark(int, char const *)
void itt_thread_set_name(char const *)
void itt_thread_ignore()
void itt_task_begin(___itt_domain const *, ___itt_string_handle *)
void itt_task_begin(___itt_domain const *, ___itt_id *, ___itt_string_handle *)
void itt_task_end(___itt_domain const *)
___itt_domain *itt_domain_create(char const *)
___itt_string_handle *itt_string_handle_create(char const *)
___itt_id *itt_make_id(void *, unsigned long)
void itt_id_create(___itt_domain const *, ___itt_id *)
void itt_id_destroy(___itt_id *)
__itt_heap_function itt_heap_function_create(const char *, const char *)
void itt_heap_allocate_begin(__itt_heap_function, std::size_t, int)
void itt_heap_allocate_end(__itt_heap_function, void **, std::size_t, int)
void itt_heap_free_begin(__itt_heap_function, void *)
void itt_heap_free_end(__itt_heap_function, void *)
void itt_heap_reallocate_begin(__itt_heap_function, void *, std::size_t, int)
void itt_heap_reallocate_end(__itt_heap_function, void *, void **, std::size_t, int)
void itt_heap_internal_access_begin()
void itt_heap_internal_access_end()
___itt_counter *itt_counter_create(char const *, char const *)
___itt_counter *itt_counter_create_typed(char const *, char const *, int)
void itt_counter_destroy(___itt_counter *)
void itt_counter_set_value(___itt_counter *, void *)
int itt_event_create(char const *, int)
int itt_event_start(int)
int itt_event_end(int)
void itt_metadata_add(___itt_domain *, ___itt_id *, ___itt_string_handle *, std::uint64_t const&)
void itt_metadata_add(___itt_domain *, ___itt_id *, ___itt_string_handle *, double const&)
void itt_metadata_add(___itt_domain *, ___itt_id *, ___itt_string_handle *, char const *)
void itt_metadata_add(___itt_domain *, ___itt_id *, ___itt_string_handle *, void const *)
namespace hpx
namespace util
namespace itt

Functions

void event_tick(event const&)
struct caller_context

Public Functions

caller_context(stack_context&)
~caller_context()
struct counter

Public Functions

counter(char const *, char const *)
~counter()
struct domain

Subclassed by hpx::util::itt::thread_domain

Public Functions

HPX_NON_COPYABLE(domain)
domain(char const *)
domain()
struct event

Public Functions

event(char const *)
struct frame_context

Public Functions

frame_context(domain const&, id * = nullptr)
~frame_context()
struct heap_allocate

Public Functions

template<typename T>
heap_allocate(heap_function&, T **, std::size_t, int)
~heap_allocate()
struct heap_free

Public Functions

heap_free(heap_function&, void *)
~heap_free()
struct heap_function

Public Functions

heap_function(char const *, char const *)
~heap_function()
struct heap_internal_access

Public Functions

heap_internal_access()
~heap_internal_access()
struct id

Public Functions

id(domain const&, void *, unsigned long = 0)
~id()
struct mark_context

Public Functions

mark_context(char const *)
~mark_context()
struct mark_event

Public Functions

mark_event(event const&)
~mark_event()
struct stack_context

Public Functions

stack_context()
~stack_context()
struct string_handle

Public Functions

string_handle(char const * = nullptr)
struct task

Public Functions

task(domain const&, string_handle const&, std::uint64_t)
task(domain const&, string_handle const&)
~task()
struct thread_domain : public hpx::util::itt::domain

Public Functions

HPX_NON_COPYABLE(thread_domain)
thread_domain()
struct undo_frame_context

Public Functions

undo_frame_context(frame_context const&)
~undo_frame_context()
struct undo_mark_context

Public Functions

undo_mark_context(mark_context const&)
~undo_mark_context()

#include <hpx/concurrency/spinlock_pool.hpp>

namespace hpx
namespace util
template<typename Tag, std::size_t N = HPX_HAVE_SPINLOCK_POOL_NUM>
class spinlock_pool

Public Static Functions

static boost::detail::spinlock &spinlock_for(void const *pv)

Private Static Attributes

cache_aligned_data<boost::detail::spinlock> pool_
class scoped_lock

Public Functions

template<>
HPX_NON_COPYABLE(scoped_lock)
template<>
scoped_lock(void const *pv)
template<>
~scoped_lock()
template<>
void lock()
template<>
void unlock()

Private Members

template<>
boost::detail::spinlock &sp_

#include <hpx/concurrency/thread_name.hpp>

#include <hpx/concurrency/barrier.hpp>

namespace hpx
namespace util
class barrier

Public Functions

barrier(std::size_t number_of_threads)
~barrier()
void wait()

Private Types

typedef std::mutex mutex_type

Private Members

HPX_STATIC_CONSTEXPR std::size_t hpx::util::barrier::barrier_flag= static_cast<std::size_t>(1) << (CHAR_BIT * sizeof(std::size_t) - 1)
std::size_t const number_of_threads_
std::size_t total_
mutex_type mtx_
std::condition_variable cond_

#include <hpx/concurrency/deque.hpp>

namespace boost
namespace lockfree

Enums

enum deque_status_type

Values:

stable
rpush
lpush
template<typename T, typename freelist_t = caching_freelist_t, typename Alloc = std::allocator<T>>
struct deque

Public Types

typedef deque_node<T> node
typedef node::pointer node_pointer
typedef node::atomic_pointer atomic_node_pointer
typedef node::tag_t tag_t
typedef deque_anchor<T> anchor
typedef anchor::pair anchor_pair
typedef anchor::atomic_pair atomic_anchor_pair
typedef Alloc::template rebind<node>::other node_allocator
typedef std::conditional<std::is_same<freelist_t, caching_freelist_t>::value, caching_freelist<node, node_allocator>, static_freelist<node, node_allocator>>::type pool

Public Functions

HPX_NON_COPYABLE(deque)
deque(std::size_t initial_nodes = 128)
~deque()
bool empty() const
bool is_lock_free() const
bool push_left(T const &data)
bool push_right(T const &data)
bool pop_left(T &r)
bool pop_left(T *r)
bool pop_right(T &r)
bool pop_right(T *r)

Private Functions

node *alloc_node(node *lptr, node *rptr, T const &v, tag_t ltag = 0, tag_t rtag = 0)
void dealloc_node(node *n)
void stabilize_left(anchor_pair &lrs)
void stabilize_right(anchor_pair &lrs)
void stabilize(anchor_pair &lrs)

Private Members

anchor anchor_
pool pool_
HPX_STATIC_CONSTEXPR std::size_t boost::lockfree::deque::padding_size= BOOST_LOCKFREE_CACHELINE_BYTES - sizeof(anchor)
template<>
char padding[padding_size]
template<typename T>
struct deque_anchor

Public Types

typedef deque_node<T> node
typedef node::pointer node_pointer
typedef node::atomic_pointer atomic_node_pointer
typedef node::tag_t tag_t
typedef tagged_ptr_pair<node, node> pair
typedef std::atomic<pair> atomic_pair

Public Functions

deque_anchor()
deque_anchor(deque_anchor const &p)
deque_anchor(pair const &p)
deque_anchor(node *lptr, node *rptr, tag_t status = stable, tag_t tag = 0)
pair lrs() volatile const
node *left() volatile const
node *right() volatile const
tag_t status() volatile const
tag_t tag() volatile const
bool cas(deque_anchor &expected, deque_anchor const &desired) volatile
bool cas(pair &expected, deque_anchor const &desired) volatile
bool cas(deque_anchor &expected, pair const &desired) volatile
bool cas(pair &expected, pair const &desired) volatile
bool operator==(volatile deque_anchor const &rhs) const
bool operator!=(volatile deque_anchor const &rhs) const
bool operator==(volatile pair const &rhs) const
bool operator!=(volatile pair const &rhs) const
bool is_lock_free() const

Private Members

atomic_pair pair_
template<typename T>
struct deque_node

Public Types

typedef detail::tagged_ptr<deque_node> pointer
typedef std::atomic<pointer> atomic_pointer
typedef pointer::tag_t tag_t

Public Functions

deque_node()
deque_node(deque_node const &p)
deque_node(deque_node *lptr, deque_node *rptr, T const &v, tag_t ltag = 0, tag_t rtag = 0)

Public Members

atomic_pointer left
atomic_pointer right
T data

#include <hpx/concurrency/spinlock.hpp>

namespace hpx
namespace util
struct spinlock
#include <spinlock.hpp>

boost::mutex-compatible spinlock class

Public Types

typedef boost::detail::spinlock *native_handle_type

Public Functions

HPX_NON_COPYABLE(spinlock)
spinlock(char const * = nullptr)
~spinlock()
void lock()
bool try_lock()
void unlock()
native_handle_type native_handle()

Private Members

boost::detail::spinlock m = BOOST_DETAIL_SPINLOCK_INIT

#include <hpx/concurrency/concurrentqueue.hpp>

Defines

MOODYCAMEL_THREADLOCAL
MOODYCAMEL_EXCEPTIONS_ENABLED
MOODYCAMEL_TRY
MOODYCAMEL_CATCH(...)
MOODYCAMEL_RETHROW
MOODYCAMEL_THROW(expr)
MOODYCAMEL_NOEXCEPT
MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr)
MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr)
MOODYCAMEL_DELETE_FUNCTION
namespace moodycamel

Functions

template<typename T, typename Traits>
void swap(typename ConcurrentQueue<T, Traits>::ImplicitProducerKVP &a, typename ConcurrentQueue<T, Traits>::ImplicitProducerKVP &b)
template<typename T, typename Traits>
void swap(ConcurrentQueue<T, Traits> &a, ConcurrentQueue<T, Traits> &b)
void swap(ProducerToken &a, ProducerToken &b)
void swap(ConsumerToken &a, ConsumerToken &b)
template<typename T, typename Traits = ConcurrentQueueDefaultTraits>
class ConcurrentQueue

Public Types

typedef moodycamel::ProducerToken producer_token_t
typedef moodycamel::ConsumerToken consumer_token_t
typedef Traits::index_t index_t
typedef Traits::size_t size_t

Public Functions

ConcurrentQueue(size_t capacity = 6 * BLOCK_SIZE)
ConcurrentQueue(size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers)
~ConcurrentQueue()
ConcurrentQueue(ConcurrentQueue const&)
ConcurrentQueue &operator=(ConcurrentQueue const&)
ConcurrentQueue(ConcurrentQueue &&other)
ConcurrentQueue &operator=(ConcurrentQueue &&other)
void swap(ConcurrentQueue &other)
bool enqueue(T const &item)
bool enqueue(T &&item)
bool enqueue(producer_token_t const &token, T const &item)
bool enqueue(producer_token_t const &token, T &&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)
bool try_enqueue(T const &item)
bool try_enqueue(T &&item)
bool try_enqueue(producer_token_t const &token, T const &item)
bool try_enqueue(producer_token_t const &token, T &&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)
template<typename U>
bool try_dequeue(U &item)
template<typename U>
bool try_dequeue_non_interleaved(U &item)
template<typename U>
bool try_dequeue(consumer_token_t &token, U &item)
template<typename It>
size_t try_dequeue_bulk(It itemFirst, size_t max)
template<typename It>
size_t try_dequeue_bulk(consumer_token_t &token, It itemFirst, size_t max)
template<typename U>
bool try_dequeue_from_producer(producer_token_t const &producer, U &item)
template<typename It>
size_t try_dequeue_bulk_from_producer(producer_token_t const &producer, It itemFirst, size_t max)
size_t size_approx() const

Public Static Functions

static bool is_lock_free()

Public Static Attributes

const size_t BLOCK_SIZE = static_cast<size_t>(Traits::BLOCK_SIZE)
const size_t EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = static_cast<size_t>(Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD)
const size_t EXPLICIT_INITIAL_INDEX_SIZE = static_cast<size_t>(Traits::EXPLICIT_INITIAL_INDEX_SIZE)
const size_t IMPLICIT_INITIAL_INDEX_SIZE = static_cast<size_t>(Traits::IMPLICIT_INITIAL_INDEX_SIZE)
const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = static_cast<size_t>(Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE)
const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = static_cast<std::uint32_t>(Traits::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE)
const size_t moodycamel::ConcurrentQueue::MAX_SUBQUEUE_SIZE = (details::const_numeric_max<size_t>::value - static_cast<size_t>(Traits::MAX_SUBQUEUE_SIZE) < BLOCK_SIZE) ? details::const_numeric_max<size_t>::value : ((static_cast<size_t>(Traits::MAX_SUBQUEUE_SIZE) + (BLOCK_SIZE - 1)) / BLOCK_SIZE * BLOCK_SIZE)

Private Types

enum AllocationMode

Values:

CanAlloc
CannotAlloc
enum InnerQueueContext

Values:

implicit_context = 0
explicit_context = 1

Private Functions

ConcurrentQueue &swap_internal(ConcurrentQueue &other)
template<AllocationMode canAlloc, typename U>
bool inner_enqueue(producer_token_t const &token, U &&element)
template<AllocationMode canAlloc, typename U>
bool inner_enqueue(U &&element)
template<AllocationMode canAlloc, typename It>
bool inner_enqueue_bulk(producer_token_t const &token, It itemFirst, size_t count)
template<AllocationMode canAlloc, typename It>
bool inner_enqueue_bulk(It itemFirst, size_t count)
bool update_current_producer_after_rotation(consumer_token_t &token)
void populate_initial_block_list(size_t blockCount)
Block *try_get_block_from_initial_pool()
void add_block_to_free_list(Block *block)
void add_blocks_to_free_list(Block *block)
Block *try_get_block_from_free_list()
template<AllocationMode canAlloc>
Block *requisition_block()
ProducerBase *recycle_or_create_producer(bool isExplicit)
ProducerBase *recycle_or_create_producer(bool isExplicit, bool &recycled)
ProducerBase *add_producer(ProducerBase *producer)
void reown_producers()
void populate_initial_implicit_producer_hash()
void swap_implicit_producer_hashes(ConcurrentQueue &other)
ImplicitProducer *get_or_add_implicit_producer()

Private Members

std::atomic<ProducerBase *> producerListTail
std::atomic<std::uint32_t> producerCount
std::atomic<size_t> initialBlockPoolIndex
Block *initialBlockPool
size_t initialBlockPoolSize
FreeList<Block> freeList
std::atomic<ImplicitProducerHash *> implicitProducerHash
std::atomic<size_t> implicitProducerHashCount
ImplicitProducerHash initialImplicitProducerHash
std::array<ImplicitProducerKVP, INITIAL_IMPLICIT_PRODUCER_HASH_SIZE> initialImplicitProducerHashEntries
std::atomic_flag implicitProducerHashResizeInProgress
std::atomic<std::uint32_t> nextExplicitConsumerId
std::atomic<std::uint32_t> globalExplicitConsumerOffset

Private Static Functions

template<typename U>
static U *create_array(size_t count)
template<typename U>
static void destroy_array(U *p, size_t count)
template<typename U>
static U *create()
template<typename U, typename A1>
static U *create(A1 &&a1)
template<typename U>
static void destroy(U *p)

Friends

friend moodycamel::ProducerToken
friend moodycamel::ConsumerToken
friend moodycamel::ExplicitProducer
friend moodycamel::ImplicitProducer
friend moodycamel::ConcurrentQueueTests
template<typename XT, typename XTraits>
void swap(typename ConcurrentQueue<XT, XTraits>::ImplicitProducerKVP&, typename ConcurrentQueue<XT, XTraits>::ImplicitProducerKVP&)
struct Block

Public Functions

template<>
Block()
template<InnerQueueContext context>
bool is_empty() const
template<InnerQueueContext context>
bool set_empty(index_t i)
template<InnerQueueContext context>
bool set_many_empty(index_t i, size_t count)
template<InnerQueueContext context>
void set_all_empty()
template<InnerQueueContext context>
void reset_empty()
template<>
T *operator[](index_t idx)
template<>
T const *operator[](index_t idx) const

Public Members

template<>
char elements[sizeof(T) * BLOCK_SIZE]
template<>
details::max_align_t dummy
template<>
Block *next
template<>
std::atomic<size_t> elementsCompletelyDequeued
std::atomic<bool> moodycamel::ConcurrentQueue< T, Traits >::Block::emptyFlags[BLOCK_SIZE<=EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD ? BLOCK_SIZE :1]
template<>
std::atomic<std::uint32_t> freeListRefs
template<>
std::atomic<Block *> freeListNext
template<>
std::atomic<bool> shouldBeOnFreeList
template<>
bool dynamicallyAllocated

Private Members

template<>
union moodycamel::ConcurrentQueue::Block::[anonymous] [anonymous]
struct ExplicitProducer : public moodycamel::ConcurrentQueue<T, Traits>::ProducerBase

Public Functions

template<>
ExplicitProducer(ConcurrentQueue *parent)
template<>
~ExplicitProducer()
template<AllocationMode allocMode, typename U>
bool enqueue(U &&element)
template<typename U>
bool dequeue(U &element)
template<AllocationMode allocMode, typename It>
bool enqueue_bulk(It itemFirst, size_t count)
template<typename It>
size_t dequeue_bulk(It &itemFirst, size_t max)

Private Functions

template<>
bool new_block_index(size_t numberOfFilledSlotsToExpose)

Private Members

template<>
std::atomic<BlockIndexHeader *> blockIndex
template<>
size_t pr_blockIndexSlotsUsed
template<>
size_t pr_blockIndexSize
template<>
size_t pr_blockIndexFront
template<>
BlockIndexEntry *pr_blockIndexEntries
template<>
void *pr_blockIndexRaw
struct BlockIndexEntry

Public Members

template<>
index_t base
template<>
Block *block
struct BlockIndexHeader

Public Members

template<>
size_t size
template<>
std::atomic<size_t> front
template<>
BlockIndexEntry *entries
template<>
void *prev
template<typename N>
struct FreeList

Public Functions

template<>
FreeList()
template<>
FreeList(FreeList &&other)
template<>
void swap(FreeList &other)
template<>
FreeList(FreeList const&)
template<>
FreeList &operator=(FreeList const&)
template<>
void add(N *node)
template<>
N *try_get()
template<>
N *head_unsafe() const

Private Functions

template<>
void add_knowing_refcount_is_zero(N *node)

Private Members

template<>
std::atomic<N *> freeListHead

Private Static Attributes

template<>
const std::uint32_t REFS_MASK = 0x7FFFFFFF
template<>
const std::uint32_t SHOULD_BE_ON_FREELIST = 0x80000000
template<typename N>
struct FreeListNode

Public Functions

template<>
FreeListNode()

Public Members

template<>
std::atomic<std::uint32_t> freeListRefs
template<>
std::atomic<N *> freeListNext
struct ImplicitProducer : public moodycamel::ConcurrentQueue<T, Traits>::ProducerBase

Public Functions

template<>
ImplicitProducer(ConcurrentQueue *parent)
template<>
~ImplicitProducer()
template<AllocationMode allocMode, typename U>
bool enqueue(U &&element)
template<typename U>
bool dequeue(U &element)
template<AllocationMode allocMode, typename It>
bool enqueue_bulk(It itemFirst, size_t count)
template<typename It>
size_t dequeue_bulk(It &itemFirst, size_t max)

Private Functions

template<AllocationMode allocMode>
bool insert_block_index_entry(BlockIndexEntry *&idxEntry, index_t blockStartIndex)
template<>
void rewind_block_index_tail()
template<>
BlockIndexEntry *get_block_index_entry_for_index(index_t index) const
template<>
size_t get_block_index_index_for_index(index_t index, BlockIndexHeader *&localBlockIndex) const
template<>
bool new_block_index()

Private Members

template<>
size_t nextBlockIndexCapacity
template<>
std::atomic<BlockIndexHeader *> blockIndex

Private Static Attributes

template<>
const index_t INVALID_BLOCK_BASE = 1
struct BlockIndexEntry

Public Members

template<>
std::atomic<index_t> key
template<>
std::atomic<Block *> value
struct BlockIndexHeader

Public Members

template<>
size_t capacity
template<>
std::atomic<size_t> tail
template<>
BlockIndexEntry *entries
template<>
BlockIndexEntry **index
template<>
BlockIndexHeader *prev
struct ImplicitProducerHash

Public Members

template<>
size_t capacity
template<>
ImplicitProducerKVP *entries
template<>
ImplicitProducerHash *prev
struct ImplicitProducerKVP

Public Functions

template<>
ImplicitProducerKVP()
template<>
ImplicitProducerKVP(ImplicitProducerKVP &&other)
template<>
ImplicitProducerKVP &operator=(ImplicitProducerKVP &&other)
template<>
void swap(ImplicitProducerKVP &other)

Public Members

template<>
std::atomic<details::thread_id_t> key
template<>
ImplicitProducer *value
struct ProducerBase : public moodycamel::details::ConcurrentQueueProducerTypelessBase

Public Functions

template<>
ProducerBase(ConcurrentQueue *parent_, bool isExplicit_)
template<>
virtual ~ProducerBase()
template<typename U>
bool dequeue(U &element)
template<typename It>
size_t dequeue_bulk(It &itemFirst, size_t max)
template<>
ProducerBase *next_prod() const
template<>
size_t size_approx() const
template<>
index_t getTail() const

Public Members

template<>
bool isExplicit
template<>
ConcurrentQueue *parent

Protected Attributes

template<>
std::atomic<index_t> tailIndex
template<>
std::atomic<index_t> headIndex
template<>
std::atomic<index_t> dequeueOptimisticCount
template<>
std::atomic<index_t> dequeueOvercommit
template<>
Block *tailBlock
struct ConcurrentQueueDefaultTraits

Public Types

typedef std::size_t size_t
typedef std::size_t index_t

Public Static Functions

static void *malloc(size_t size)
static void free(void *ptr)

Public Static Attributes

const size_t BLOCK_SIZE = 32
const size_t EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = 32
const size_t EXPLICIT_INITIAL_INDEX_SIZE = 32
const size_t IMPLICIT_INITIAL_INDEX_SIZE = 32
const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = 32
const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = 256
const size_t MAX_SUBQUEUE_SIZE = details::const_numeric_max<size_t>::value
struct ConsumerToken

Public Functions

template<typename T, typename Traits>
ConsumerToken(ConcurrentQueue<T, Traits> &q)
template<typename T, typename Traits>
ConsumerToken(BlockingConcurrentQueue<T, Traits> &q)
ConsumerToken(ConsumerToken &&other)
ConsumerToken &operator=(ConsumerToken &&other)
void swap(ConsumerToken &other)
ConsumerToken(ConsumerToken const&)
ConsumerToken &operator=(ConsumerToken const&)

Private Members

std::uint32_t initialOffset
std::uint32_t lastKnownGlobalOffset
std::uint32_t itemsConsumedFromCurrent
details::ConcurrentQueueProducerTypelessBase *currentProducer
details::ConcurrentQueueProducerTypelessBase *desiredProducer

Friends

friend moodycamel::ConcurrentQueue
friend moodycamel::ConcurrentQueueTests
struct ProducerToken

Public Functions

template<typename T, typename Traits>
ProducerToken(ConcurrentQueue<T, Traits> &queue)
template<typename T, typename Traits>
ProducerToken(BlockingConcurrentQueue<T, Traits> &queue)
ProducerToken(ProducerToken &&other)
ProducerToken &operator=(ProducerToken &&other)
void swap(ProducerToken &other)
bool valid() const
~ProducerToken()
ProducerToken(ProducerToken const&)
ProducerToken &operator=(ProducerToken const&)

Protected Attributes

details::ConcurrentQueueProducerTypelessBase *producer

Friends

friend moodycamel::ConcurrentQueue
friend moodycamel::ConcurrentQueueTests
namespace details

Typedefs

typedef std::uintptr_t thread_id_t
typedef std::max_align_t std_max_align_t

Functions

static thread_id_t thread_id()
static bool() moodycamel::details::likely(bool x)
static bool() moodycamel::details::unlikely(bool x)
static size_t hash_thread_id(thread_id_t id)
template<typename T>
static bool circular_less_than(T a, T b)
template<typename U>
static char *align_for(char *ptr)
template<typename T>
static T ceil_to_pow_2(T x)
template<typename T>
static void swap_relaxed(std::atomic<T> &left, std::atomic<T> &right)
template<typename T>
static T const &nomove(T const &x)
template<typename It>
static auto deref_noexcept(It &it)

Variables

const thread_id_t invalid_thread_id = 0
const thread_id_t invalid_thread_id2 = 1
template<bool use32>
struct _hash_32_or_64

Public Static Functions

static std::uint32_t hash(std::uint32_t h)
template<>
struct _hash_32_or_64<1>

Public Static Functions

static std::uint64_t hash(std::uint64_t h)
struct ConcurrentQueueProducerTypelessBase

Public Functions

ConcurrentQueueProducerTypelessBase()

Public Members

ConcurrentQueueProducerTypelessBase *next
std::atomic<bool> inactive
ProducerToken *token
template<typename T>
struct const_numeric_max

Public Static Attributes

const T moodycamel::details::const_numeric_max::value= std::numeric_limits<T>::is_signed ? (static_cast<T>(1) << (sizeof(T) * CHAR_BIT - 1)) - static_cast<T>(1) : static_cast<T>(-1)
union max_align_t

Public Members

std_max_align_t x
long long y
void *z
template<bool Enable>
struct nomove_if

Public Static Functions

template<typename T>
static T const &eval(T const &x)
template<>
struct nomove_if<false>

Public Static Functions

template<typename U>
static auto eval(U &&x)
template<>
struct static_is_lock_free<bool>

Public Types

enum [anonymous]

Values:

value = ATOMIC_BOOL_LOCK_FREE
template<typename U>
struct static_is_lock_free<U *>

Public Types

enum [anonymous]

Values:

value = ATOMIC_POINTER_LOCK_FREE
template<typename T>
struct static_is_lock_free_num

Public Types

enum [anonymous]

Values:

value = 0
template<>
struct static_is_lock_free_num<int>

Public Types

enum [anonymous]

Values:

value = ATOMIC_INT_LOCK_FREE
template<>
struct static_is_lock_free_num<long>

Public Types

enum [anonymous]

Values:

value = ATOMIC_LONG_LOCK_FREE
template<>
struct static_is_lock_free_num<long long>

Public Types

enum [anonymous]

Values:

value = ATOMIC_LLONG_LOCK_FREE
template<>
struct static_is_lock_free_num<short>

Public Types

enum [anonymous]

Values:

value = ATOMIC_SHORT_LOCK_FREE
template<>
struct static_is_lock_free_num<signed char>

Public Types

enum [anonymous]

Values:

value = ATOMIC_CHAR_LOCK_FREE
template<typename thread_id_t>
struct thread_id_converter

Public Types

typedef thread_id_t thread_id_numeric_size_t
typedef thread_id_t thread_id_hash_t

Public Static Functions

static thread_id_hash_t prehash(thread_id_t const &x)

#include <hpx/concurrency/cache_line_data.hpp>

template<typename Data>
struct cache_aligned_data<Data, std::false_type>

Public Functions

cache_aligned_data()
cache_aligned_data(Data &&data)
cache_aligned_data(Data const &data)

Public Members

Data data_
namespace hpx
namespace threads

Functions

constexpr std::size_t get_cache_line_size()
namespace util

Typedefs

using cache_line_data = cache_aligned_data<Data>
template<typename Data, typename NeedsPadding = typename detail::needs_padding<Data>::type>
struct cache_aligned_data

Public Functions

cache_aligned_data()
cache_aligned_data(Data &&data)
cache_aligned_data(Data const &data)

Public Members

Data data_
template<>
char cacheline_pad[get_cache_line_padding_size(sizeof(Data))]
template<typename Data>
struct cache_aligned_data<Data, std::false_type>

Public Functions

cache_aligned_data()
cache_aligned_data(Data &&data)
cache_aligned_data(Data const &data)

Public Members

Data data_

#include <compatibility/hpx/util/itt_notify.hpp>

#include <compatibility/hpx/util/spinlock_pool.hpp>

#include <compatibility/hpx/util/spinlock.hpp>

#include <compatibility/hpx/util/lockfree/freelist.hpp>

#include <compatibility/hpx/util/lockfree/deque.hpp>

#include <compatibility/hpx/util/lockfree/concurrentqueue.hpp>

#include <compatibility/hpx/compat/barrier.hpp>