Lockless Task Scheduler  v1.0a
A lockless task scheduler
Namespaces | Classes | Typedefs | Functions | Variables
task_scheduler Namespace Reference

Class stl_allocator. More...

Namespaces

 atomics
 The atomics namespace.
 

Classes

union  address
 
class  alarm
 
struct  atomic_lock_free_node
 
struct  atomic_lock_free_node_ptr
 
class  attribute
 
class  attribute< TOwnerClass, const tchar_t * >
 
class  base_data_task
 
class  base_scoped_param
 
struct  base_sub_graph
 Struct base_sub_graph More...
 
class  base_task
 Class base_task. More...
 
class  base_task_events
 
class  base_task_graph
 Class base_task_graph. More...
 
class  base_task_graph_helper
 
struct  base_thread
 Struct base_thread More...
 
class  base_thread_index
 
class  base_thread_pool
 Class base_thread_pool. More...
 
class  base_worker_task
 
class  constrained
 Class constrained. More...
 
class  default_mem_interface
 
class  dummy
 
class  event
 
class  globals
 class globals More...
 
class  guarded
 
class  guarded_write_array
 
class  lock_free_batch_dispatcher
 Class lock_free_batch_dispatcher. More...
 
struct  lock_free_node
 
class  lock_free_node_dispenser
 
class  lock_free_node_stack
 
class  lock_free_queue
 
class  lock_free_stack
 
class  multi_producer_multi_consumer
 
struct  out_t
 Struct out_t More...
 
class  scoped_enter_exit
 Class scoped_enter_exit. More...
 
class  scoped_enter_exit< TClassType, base_scoped_param >
 
class  stl_allocator
 
struct  thread_unsafe_access_storage
 Struct thread_unsafe_access_storage More...
 
class  unsafe_multi_threaded_access_detector
 Class unsafe_multi_threaded_access_detector. More...
 

Typedefs

template<typename T , class TMemInterface >
using guarded_vector = guarded< T, std::vector< T, stl_allocator< T, TMemInterface > >, TMemInterface >
 
typedef constrained< float, 0, 100 > percentage_t
 
typedef uint8_t thread_num_t
 
typedef uint64_t thread_mask_int_t
 
template<class TMemInterface >
using thread_index_t = base_thread_index< thread_num_t, TMemInterface >
 
typedef scoped_enter_exit< unsafe_multi_threaded_access_detector< thread_unsafe_access_storage >, thread_unsafe_access_storagethread_unsafe_access_guard
 

Functions

uint32_t get_cache_line_size ()
 Gets the size of the cache line. More...
 
uint8_t get_thread_number ()
 Gets the thread number. More...
 
template<class T >
T * get_current_thread ()
 Gets the current thread. More...
 
template<typename ValueType , class TMemInterface >
base_thread_index< ValueType, TMemInterface > operator+ (base_thread_index< ValueType, TMemInterface > lhs, const base_thread_index< ValueType, TMemInterface > &rhs)
 
template<typename ValueType , class TMemInterface >
base_thread_index< ValueType, TMemInterface > operator+ (base_thread_index< ValueType, TMemInterface > lhs, int32_t rhs)
 
template<typename ValueType , class TMemInterface >
base_thread_index< ValueType, TMemInterface > operator+ (int32_t lhs, const base_thread_index< ValueType, TMemInterface > &rhs)
 
template<typename ValueType , class TMemInterface >
base_thread_index< ValueType, TMemInterface > operator- (base_thread_index< ValueType, TMemInterface > lhs, const base_thread_index< ValueType, TMemInterface > &rhs)
 
template<typename ValueType , class TMemInterface >
base_thread_index< ValueType, TMemInterface > operator- (base_thread_index< ValueType, TMemInterface > lhs, int32_t rhs)
 
template<typename ValueType , class TMemInterface >
base_thread_index< ValueType, TMemInterface > operator- (int32_t lhs, const base_thread_index< ValueType, TMemInterface > &rhs)
 
thread_mask_int_t create_mask_64 ()
 Creates the mask 64. More...
 
template<typename T , typename... Args>
thread_mask_int_t create_mask_64 (T first, Args... args)
 Creates the mask 64. More...
 
template<class TInterface , class TKey = TInterface>
TInterface * get ()
 
template<class TInterface , class TAsType , class TKey = TInterface>
TAsType * get_as ()
 
template<class TInterface , class TKey >
TInterface * create ()
 
template<class TInterface >
void destroy (TInterface *_interface)
 

Variables

const thread_num_t max_num_threads = 64
 The maximum number threads More...
 
thread_local tstring thread_name
 The thread name More...
 
thread_local thread_num_t thread_unique_number
 The thread unique number More...
 
thread_local void * current_thread
 The current thread More...
 

Detailed Description

Class stl_allocator.

The task_scheduler namespace.

See also
TMemInterface

Function Documentation

◆ create_mask_64() [1/2]

thread_mask_int_t task_scheduler::create_mask_64 ( )
inline

Creates the mask 64.

Returns
thread_mask_int_t.

◆ create_mask_64() [2/2]

template<typename T , typename... Args>
thread_mask_int_t task_scheduler::create_mask_64 ( first,
Args...  args 
)

Creates the mask 64.

Parameters
firstThe first.
...argsThe ...args.
Returns
thread_mask_int_t.

◆ get_cache_line_size()

uint32_t task_scheduler::get_cache_line_size ( )

Gets the size of the cache line.

Returns
uint32_t.

◆ get_current_thread()

template<class T >
T* task_scheduler::get_current_thread ( )

Gets the current thread.

Returns
T *.

◆ get_thread_number()

uint8_t task_scheduler::get_thread_number ( )
inline

Gets the thread number.

Returns
uint8_t.

◆ operator+()

template<typename ValueType , class TMemInterface >
base_thread_index< ValueType, TMemInterface > task_scheduler::operator+ ( base_thread_index< ValueType, TMemInterface >  lhs,
const base_thread_index< ValueType, TMemInterface > &  rhs 
)
inline
Parameters
lhsThe LHS.
rhsThe RHS.
Returns
task_scheduler.base_thread_index<ValueType, TMemInterface>.

Variable Documentation

◆ current_thread

thread_local void* task_scheduler::current_thread

The current thread

◆ max_num_threads

const thread_num_t task_scheduler::max_num_threads = 64

The maximum number threads

◆ thread_name

thread_local tstring task_scheduler::thread_name

The thread name

◆ thread_unique_number

thread_local thread_num_t task_scheduler::thread_unique_number

The thread unique number