A library for working with phylogenetic and population genetic data.
v0.32.0
concurrent_queue.hpp File Reference
#include <atomic>
#include <cassert>
#include <algorithm>
#include <array>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <limits>
#include <mutex>
#include <thread>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

class  BlockingConcurrentQueue< T, Traits >
 
class  ConcurrentQueue< T, Traits >
 
class  ConcurrentQueue< T, Traits >
 
struct  ConcurrentQueueDefaultTraits
 
struct  ConsumerToken
 
struct  _hash_32_or_64< use32 >
 
struct  _hash_32_or_64< 1 >
 
struct  ConcurrentQueueProducerTypelessBase
 
struct  const_numeric_max< T >
 
struct  hash_32_or_64< size >
 
struct  identity< T >
 
struct  is_trivially_destructible< T >
 
union  max_align_t
 
struct  nomove_if< Enable >
 
struct  nomove_if< false >
 
struct  static_is_lock_free< T >
 
struct  static_is_lock_free< bool >
 
struct  static_is_lock_free< U * >
 
struct  static_is_lock_free_num< T >
 
struct  static_is_lock_free_num< int >
 
struct  static_is_lock_free_num< long >
 
struct  static_is_lock_free_num< long long >
 
struct  static_is_lock_free_num< short >
 
struct  static_is_lock_free_num< signed char >
 
struct  thread_id_converter< thread_id_t >
 
struct  ThreadExitListener
 
class  ThreadExitNotifier
 
struct  ProducerToken
 

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::utils
 
 genesis::utils::details
 

Macros

#define MOODYCAMEL_ALIGNAS(alignment)   alignas(alignment)
 
#define MOODYCAMEL_ALIGNED_TYPE_LIKE(T, obj)   alignas(alignof(obj)) typename details::identity<T>::type
 
#define MOODYCAMEL_ALIGNOF(obj)   alignof(obj)
 
#define MOODYCAMEL_CATCH(...)   catch (__VA_ARGS__)
 
#define MOODYCAMEL_CONSTEXPR_IF   if
 
#define MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED
 
#define MOODYCAMEL_DELETE_FUNCTION   = delete
 
#define MOODYCAMEL_EXCEPTIONS_ENABLED
 
#define MOODYCAMEL_MAYBE_UNUSED
 
#define MOODYCAMEL_NO_TSAN
 
#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)   throw(expr)
 
#define MOODYCAMEL_TRY   try
 

Typedefs

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

Functions

template<typename U >
static char * align_for (char *ptr)
 
template<typename T >
static T ceil_to_pow_2 (T x)
 
template<typename T >
static bool circular_less_than (T a, T b)
 
template<typename It >
static auto deref_noexcept (It &it) noexcept -> decltype(*it)
 
static size_t hash_thread_id (thread_id_t id)
 
static bool() likely (bool x)
 
template<typename T >
static T const & nomove (T const &x)
 
template<typename T , typename Traits >
void swap (ConcurrentQueue< T, Traits > &a, ConcurrentQueue< T, Traits > &b) noexcept
 
void swap (ConsumerToken &a, ConsumerToken &b) noexcept
 
void swap (ProducerToken &a, ProducerToken &b) noexcept
 
template<typename T , typename Traits >
void swap (typename ConcurrentQueue< T, Traits >::ImplicitProducerKVP &a, typename ConcurrentQueue< T, Traits >::ImplicitProducerKVP &b) noexcept
 
template<typename T >
static void swap_relaxed (std::atomic< T > &left, std::atomic< T > &right)
 
thread_id_t thread_id ()
 
static bool() unlikely (bool x)
 

Variables

static const thread_id_t invalid_thread_id = 0
 
static const thread_id_t invalid_thread_id2 = 1
 

Macro Definition Documentation

◆ MOODYCAMEL_ALIGNAS

#define MOODYCAMEL_ALIGNAS (   alignment)    alignas(alignment)

Definition at line 381 of file concurrent_queue.hpp.

◆ MOODYCAMEL_ALIGNED_TYPE_LIKE

#define MOODYCAMEL_ALIGNED_TYPE_LIKE (   T,
  obj 
)    alignas(alignof(obj)) typename details::identity<T>::type

Definition at line 383 of file concurrent_queue.hpp.

◆ MOODYCAMEL_ALIGNOF

#define MOODYCAMEL_ALIGNOF (   obj)    alignof(obj)

Definition at line 382 of file concurrent_queue.hpp.

◆ MOODYCAMEL_CATCH

#define MOODYCAMEL_CATCH (   ...)    catch (__VA_ARGS__)

Definition at line 272 of file concurrent_queue.hpp.

◆ MOODYCAMEL_CONSTEXPR_IF

#define MOODYCAMEL_CONSTEXPR_IF   if

Definition at line 259 of file concurrent_queue.hpp.

◆ MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED

#define MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED

Definition at line 313 of file concurrent_queue.hpp.

◆ MOODYCAMEL_DELETE_FUNCTION

#define MOODYCAMEL_DELETE_FUNCTION   = delete

Definition at line 324 of file concurrent_queue.hpp.

◆ MOODYCAMEL_EXCEPTIONS_ENABLED

#define MOODYCAMEL_EXCEPTIONS_ENABLED

Definition at line 267 of file concurrent_queue.hpp.

◆ MOODYCAMEL_MAYBE_UNUSED

#define MOODYCAMEL_MAYBE_UNUSED

Definition at line 260 of file concurrent_queue.hpp.

◆ MOODYCAMEL_NO_TSAN

#define MOODYCAMEL_NO_TSAN

Definition at line 393 of file concurrent_queue.hpp.

◆ MOODYCAMEL_NOEXCEPT

#define MOODYCAMEL_NOEXCEPT   noexcept

Definition at line 298 of file concurrent_queue.hpp.

◆ MOODYCAMEL_NOEXCEPT_ASSIGN

#define MOODYCAMEL_NOEXCEPT_ASSIGN (   type,
  valueType,
  expr 
)    noexcept(expr)

Definition at line 300 of file concurrent_queue.hpp.

◆ MOODYCAMEL_NOEXCEPT_CTOR

#define MOODYCAMEL_NOEXCEPT_CTOR (   type,
  valueType,
  expr 
)    noexcept(expr)

Definition at line 299 of file concurrent_queue.hpp.

◆ MOODYCAMEL_RETHROW

#define MOODYCAMEL_RETHROW   throw

Definition at line 273 of file concurrent_queue.hpp.

◆ MOODYCAMEL_THREADLOCAL

#define MOODYCAMEL_THREADLOCAL   thread_local

Definition at line 235 of file concurrent_queue.hpp.

◆ MOODYCAMEL_THROW

#define MOODYCAMEL_THROW (   expr)    throw(expr)

Definition at line 274 of file concurrent_queue.hpp.

◆ MOODYCAMEL_TRY

#define MOODYCAMEL_TRY   try

Definition at line 271 of file concurrent_queue.hpp.