ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::detail::work_stealing_deque< T > Class Template Reference

#include <work_stealing_deque.hpp>

Public Member Functions

 work_stealing_deque (size_t capacity=default_capacity)
 
auto push (T &&item) -> bool
 
template<typename U = T, std::enable_if_t< std::is_copy_constructible_v< U >, int > = 0>
auto push (T const &item) -> bool
 
auto pop (T &item) -> bool
 
auto steal (T &item) -> bool
 
auto size () const -> size_t
 
auto empty () const -> bool
 
void clear ()
 
auto clear_and_count () -> size_t
 

Static Public Attributes

static constexpr size_t cache_line_size = 64
 
static constexpr size_t default_capacity = 1024
 

Detailed Description

template<typename T>
class threadschedule::detail::work_stealing_deque< T >

Definition at line 18 of file work_stealing_deque.hpp.

Constructor & Destructor Documentation

◆ work_stealing_deque()

template<typename T >
threadschedule::detail::work_stealing_deque< T >::work_stealing_deque ( size_t  capacity = default_capacity)
inlineexplicit

Definition at line 43 of file work_stealing_deque.hpp.

Member Function Documentation

◆ clear()

template<typename T >
void threadschedule::detail::work_stealing_deque< T >::clear ( )
inline

Definition at line 117 of file work_stealing_deque.hpp.

◆ clear_and_count()

template<typename T >
auto threadschedule::detail::work_stealing_deque< T >::clear_and_count ( ) -> size_t
inline

Definition at line 123 of file work_stealing_deque.hpp.

◆ empty()

template<typename T >
auto threadschedule::detail::work_stealing_deque< T >::empty ( ) const -> bool
inline

Definition at line 111 of file work_stealing_deque.hpp.

◆ pop()

template<typename T >
auto threadschedule::detail::work_stealing_deque< T >::pop ( T &  item) -> bool
inline

Definition at line 76 of file work_stealing_deque.hpp.

◆ push() [1/2]

template<typename T >
auto threadschedule::detail::work_stealing_deque< T >::push ( T &&  item) -> bool
inline

Definition at line 49 of file work_stealing_deque.hpp.

◆ push() [2/2]

template<typename T >
template<typename U = T, std::enable_if_t< std::is_copy_constructible_v< U >, int > = 0>
auto threadschedule::detail::work_stealing_deque< T >::push ( T const &  item) -> bool
inline

Definition at line 63 of file work_stealing_deque.hpp.

◆ size()

template<typename T >
auto threadschedule::detail::work_stealing_deque< T >::size ( ) const -> size_t
inline

Definition at line 103 of file work_stealing_deque.hpp.

◆ steal()

template<typename T >
auto threadschedule::detail::work_stealing_deque< T >::steal ( T &  item) -> bool
inline

Definition at line 90 of file work_stealing_deque.hpp.

Member Data Documentation

◆ cache_line_size

template<typename T >
constexpr size_t threadschedule::detail::work_stealing_deque< T >::cache_line_size = 64
staticconstexpr

Definition at line 21 of file work_stealing_deque.hpp.

◆ default_capacity

template<typename T >
constexpr size_t threadschedule::detail::work_stealing_deque< T >::default_capacity = 1024
staticconstexpr

Definition at line 22 of file work_stealing_deque.hpp.


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