Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
spdlog::details::mpmc_bounded_queue< T > Class Template Reference

#include <mpmc_bounded_q.h>

+ Collaboration diagram for spdlog::details::mpmc_bounded_queue< T >:

Classes

struct  cell_t
 

Public Types

using item_type = T
 

Public Member Functions

 mpmc_bounded_queue (size_t buffer_size)
 
 ~mpmc_bounded_queue ()
 
bool enqueue (T &&data)
 
bool dequeue (T &data)
 
bool is_empty ()
 

Private Types

typedef char cacheline_pad_t[cacheline_size]
 

Private Member Functions

 mpmc_bounded_queue (mpmc_bounded_queue const &)=delete
 
void operator= (mpmc_bounded_queue const &)=delete
 

Private Attributes

size_t const max_size_
 
cacheline_pad_t pad0_
 
cell_t *const buffer_
 
size_t const buffer_mask_
 
cacheline_pad_t pad1_
 
std::atomic< size_t > enqueue_pos_
 
cacheline_pad_t pad2_
 
std::atomic< size_t > dequeue_pos_
 
cacheline_pad_t pad3_
 

Static Private Attributes

static size_t const cacheline_size = 64
 

Detailed Description

template<typename T>
class spdlog::details::mpmc_bounded_queue< T >

Definition at line 57 of file mpmc_bounded_q.h.

Member Typedef Documentation

◆ cacheline_pad_t

template<typename T >
typedef char spdlog::details::mpmc_bounded_queue< T >::cacheline_pad_t[cacheline_size]
private

Definition at line 160 of file mpmc_bounded_q.h.

◆ item_type

template<typename T >
using spdlog::details::mpmc_bounded_queue< T >::item_type = T

Definition at line 61 of file mpmc_bounded_q.h.

Constructor & Destructor Documentation

◆ mpmc_bounded_queue() [1/2]

template<typename T >
spdlog::details::mpmc_bounded_queue< T >::mpmc_bounded_queue ( size_t buffer_size)
inline

Definition at line 62 of file mpmc_bounded_q.h.

◆ ~mpmc_bounded_queue()

template<typename T >
spdlog::details::mpmc_bounded_queue< T >::~mpmc_bounded_queue ( )
inline

Definition at line 77 of file mpmc_bounded_q.h.

◆ mpmc_bounded_queue() [2/2]

template<typename T >
spdlog::details::mpmc_bounded_queue< T >::mpmc_bounded_queue ( mpmc_bounded_queue< T > const & )
privatedelete

Member Function Documentation

◆ dequeue()

template<typename T >
bool spdlog::details::mpmc_bounded_queue< T >::dequeue ( T & data)
inline

Definition at line 111 of file mpmc_bounded_q.h.

◆ enqueue()

template<typename T >
bool spdlog::details::mpmc_bounded_queue< T >::enqueue ( T && data)
inline

Definition at line 83 of file mpmc_bounded_q.h.

◆ is_empty()

template<typename T >
bool spdlog::details::mpmc_bounded_queue< T >::is_empty ( )
inline

Definition at line 136 of file mpmc_bounded_q.h.

◆ operator=()

template<typename T >
void spdlog::details::mpmc_bounded_queue< T >::operator= ( mpmc_bounded_queue< T > const & )
privatedelete

Member Data Documentation

◆ buffer_

template<typename T >
cell_t* const spdlog::details::mpmc_bounded_queue< T >::buffer_
private

Definition at line 163 of file mpmc_bounded_q.h.

◆ buffer_mask_

template<typename T >
size_t const spdlog::details::mpmc_bounded_queue< T >::buffer_mask_
private

Definition at line 164 of file mpmc_bounded_q.h.

◆ cacheline_size

template<typename T >
size_t const spdlog::details::mpmc_bounded_queue< T >::cacheline_size = 64
staticprivate

Definition at line 159 of file mpmc_bounded_q.h.

◆ dequeue_pos_

template<typename T >
std::atomic<size_t> spdlog::details::mpmc_bounded_queue< T >::dequeue_pos_
private

Definition at line 168 of file mpmc_bounded_q.h.

◆ enqueue_pos_

template<typename T >
std::atomic<size_t> spdlog::details::mpmc_bounded_queue< T >::enqueue_pos_
private

Definition at line 166 of file mpmc_bounded_q.h.

◆ max_size_

template<typename T >
size_t const spdlog::details::mpmc_bounded_queue< T >::max_size_
private

Definition at line 157 of file mpmc_bounded_q.h.

◆ pad0_

template<typename T >
cacheline_pad_t spdlog::details::mpmc_bounded_queue< T >::pad0_
private

Definition at line 162 of file mpmc_bounded_q.h.

◆ pad1_

template<typename T >
cacheline_pad_t spdlog::details::mpmc_bounded_queue< T >::pad1_
private

Definition at line 165 of file mpmc_bounded_q.h.

◆ pad2_

template<typename T >
cacheline_pad_t spdlog::details::mpmc_bounded_queue< T >::pad2_
private

Definition at line 167 of file mpmc_bounded_q.h.

◆ pad3_

template<typename T >
cacheline_pad_t spdlog::details::mpmc_bounded_queue< T >::pad3_
private

Definition at line 169 of file mpmc_bounded_q.h.


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