Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE > Class Template Reference

#include <readerwriterqueue.h>

Classes

struct  Block
 
struct  ReentrantGuard
 

Public Types

typedef T value_type
 

Public Member Functions

template<typename... Args>
AE_FORCEINLINE bool emplace (Args &&...args) AE_NO_TSAN
 
AE_FORCEINLINE bool enqueue (T const &element) AE_NO_TSAN
 
AE_FORCEINLINE bool enqueue (T &&element) AE_NO_TSAN
 
ReaderWriterQueueoperator= (ReaderWriterQueue &&other) AE_NO_TSAN
 
T * peek () AE_NO_TSAN
 
bool pop () AE_NO_TSAN
 
AE_NO_TSAN ReaderWriterQueue (size_t maxSize=15)
 
AE_NO_TSAN ReaderWriterQueue (ReaderWriterQueue &&other)
 
size_t size_approx () const AE_NO_TSAN
 
template<typename U >
bool try_dequeue (U &result) AE_NO_TSAN
 
template<typename... Args>
AE_FORCEINLINE bool try_emplace (Args &&...args) AE_NO_TSAN
 
AE_FORCEINLINE bool try_enqueue (T const &element) AE_NO_TSAN
 
AE_FORCEINLINE bool try_enqueue (T &&element) AE_NO_TSAN
 
AE_NO_TSAN ~ReaderWriterQueue ()
 

Private Types

enum  AllocationMode { CanAlloc, CannotAlloc }
 

Private Member Functions

template<AllocationMode canAlloc, typename... Args>
bool inner_enqueue (Args &&...args) AE_NO_TSAN
 
ReaderWriterQueueoperator= (ReaderWriterQueue const &)
 
 ReaderWriterQueue (ReaderWriterQueue const &)
 

Static Private Member Functions

template<typename U >
static AE_FORCEINLINE char * align_for (char *ptr) AE_NO_TSAN
 
static AE_FORCEINLINE size_t ceilToPow2 (size_t x)
 
static Blockmake_block (size_t capacity) AE_NO_TSAN
 

Private Attributes

char cachelineFiller [MOODYCAMEL_CACHE_LINE_SIZE-sizeof(weak_atomic< Block * >)]
 
bool dequeuing
 
bool enqueuing
 
weak_atomic< Block * > frontBlock
 
size_t largestBlockSize
 
weak_atomic< Block * > tailBlock
 

Detailed Description

template<typename T, size_t MAX_BLOCK_SIZE = 512>
class moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >

Definition at line 60 of file readerwriterqueue.h.

Member Typedef Documentation

template<typename T , size_t MAX_BLOCK_SIZE = 512>
typedef T moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::value_type

Definition at line 83 of file readerwriterqueue.h.

Member Enumeration Documentation

template<typename T , size_t MAX_BLOCK_SIZE = 512>
enum moodycamel::ReaderWriterQueue::AllocationMode
private
Enumerator
CanAlloc 
CannotAlloc 

Definition at line 495 of file readerwriterqueue.h.

Constructor & Destructor Documentation

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_NO_TSAN moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::ReaderWriterQueue ( size_t  maxSize = 15)
inlineexplicit

Definition at line 89 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_NO_TSAN moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::ReaderWriterQueue ( ReaderWriterQueue< T, MAX_BLOCK_SIZE > &&  other)
inline

Definition at line 150 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_NO_TSAN moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::~ReaderWriterQueue ( )
inline

Definition at line 189 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::ReaderWriterQueue ( ReaderWriterQueue< T, MAX_BLOCK_SIZE > const &  )
inlineprivate

Definition at line 612 of file readerwriterqueue.h.

Member Function Documentation

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename U >
static AE_FORCEINLINE char* moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::align_for ( char *  ptr)
inlinestaticprivate

Definition at line 634 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
static AE_FORCEINLINE size_t moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::ceilToPow2 ( size_t  x)
inlinestaticprivate

Definition at line 619 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename... Args>
AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::emplace ( Args &&...  args)
inline

Definition at line 260 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue ( T const &  element)
inline

Definition at line 244 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueue ( T &&  element)
inline

Definition at line 252 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<AllocationMode canAlloc, typename... Args>
bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::inner_enqueue ( Args &&...  args)
inlineprivate

Definition at line 499 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
static Block* moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::make_block ( size_t  capacity)
inlinestaticprivate

Definition at line 693 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
ReaderWriterQueue& moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::operator= ( ReaderWriterQueue< T, MAX_BLOCK_SIZE > &&  other)
inline

Definition at line 175 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
ReaderWriterQueue& moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::operator= ( ReaderWriterQueue< T, MAX_BLOCK_SIZE > const &  )
inlineprivate

Definition at line 615 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
T* moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::peek ( )
inline

Definition at line 369 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::pop ( )
inline

Definition at line 411 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
size_t moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::size_approx ( ) const
inline

Definition at line 478 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename U >
bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_dequeue ( U &  result)
inline

Definition at line 270 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
template<typename... Args>
AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_emplace ( Args &&...  args)
inline

Definition at line 235 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue ( T const &  element)
inline

Definition at line 219 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
AE_FORCEINLINE bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::try_enqueue ( T &&  element)
inline

Definition at line 227 of file readerwriterqueue.h.

Member Data Documentation

template<typename T , size_t MAX_BLOCK_SIZE = 512>
char moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::cachelineFiller[MOODYCAMEL_CACHE_LINE_SIZE-sizeof(weak_atomic< Block * >)]
private

Definition at line 711 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::dequeuing
private

Definition at line 718 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
bool moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::enqueuing
private

Definition at line 717 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
weak_atomic<Block*> moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::frontBlock
private

Definition at line 709 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
size_t moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::largestBlockSize
private

Definition at line 714 of file readerwriterqueue.h.

template<typename T , size_t MAX_BLOCK_SIZE = 512>
weak_atomic<Block*> moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >::tailBlock
private

Definition at line 712 of file readerwriterqueue.h.


The documentation for this class was generated from the following file:


orb_slam2_with_maps_odom
Author(s): teng zhang
autogenerated on Fri Sep 25 2020 03:24:47