Lockless Task Scheduler  v1.0a
A lockless task scheduler
Classes | Public Member Functions | Friends | List of all members
task_scheduler::guarded_write_array< T, TMemInterface > Class Template Reference
Inheritance diagram for task_scheduler::guarded_write_array< T, TMemInterface >:
Inheritance graph
[legend]
Collaboration diagram for task_scheduler::guarded_write_array< T, TMemInterface >:
Collaboration graph
[legend]

Classes

union  flags
 

Public Member Functions

 guarded_write_array (size_t _reserverd_size, bool _optimize_for_cache_line_size)
 Initializes a new instance of the guarded_write_array class. More...
 
 guarded_write_array (T *_existing_array, size_t _existing_array_size)
 Initializes a new instance of the guarded_write_array class. More...
 
 ~guarded_write_array ()
 Finalizes an instance of the guarded_write_array class. More...
 
size_t size ()
 Sizes this instance. More...
 
size_t reserved ()
 Reserveds this instance. More...
 
T * operator & ()
 Operator&s this instance. More...
 
void push_back (const T &_new_item)
 Pushes the back. More...
 
void clear ()
 Clears this instance. More...
 
T & operator[] (size_t _index)
 Operator[]s the specified index. More...
 

Friends

template<typename T , class TMemInterface >
class guarded_write_array_batch_dispenser
 

Constructor & Destructor Documentation

◆ guarded_write_array() [1/2]

template<typename T , class TMemInterface >
task_scheduler::guarded_write_array< T, TMemInterface >::guarded_write_array ( size_t  _reserverd_size,
bool  _optimize_for_cache_line_size 
)
inline

Initializes a new instance of the guarded_write_array class.

Parameters
_reserved_sizeSize of the reserved.
_optimize_for_cache_line_sizeSize of the optimize for cache line.

◆ guarded_write_array() [2/2]

template<typename T , class TMemInterface >
task_scheduler::guarded_write_array< T, TMemInterface >::guarded_write_array ( T *  _existing_array,
size_t  _existing_array_size 
)
inline

Initializes a new instance of the guarded_write_array class.

Parameters
_existing_arrayThe existing array.
_existing_array_sizeSize of the existing array.

◆ ~guarded_write_array()

template<typename T , class TMemInterface >
task_scheduler::guarded_write_array< T, TMemInterface >::~guarded_write_array ( )
inline

Finalizes an instance of the guarded_write_array class.

Member Function Documentation

◆ clear()

template<typename T , class TMemInterface >
void task_scheduler::guarded_write_array< T, TMemInterface >::clear ( )
inline

Clears this instance.

◆ operator &()

template<typename T , class TMemInterface >
T* task_scheduler::guarded_write_array< T, TMemInterface >::operator& ( )

Operator&s this instance.

Returns
T *.

◆ operator[]()

template<typename T , class TMemInterface >
T & task_scheduler::guarded_write_array< T, TMemInterface >::operator[] ( size_t  _index)
inline

Operator[]s the specified index.

Parameters
_indexThe index.
Returns
T &.

◆ push_back()

template<typename T , class TMemInterface >
void task_scheduler::guarded_write_array< T, TMemInterface >::push_back ( const T &  _new_item)
inline

Pushes the back.

Parameters
_new_itemThe new item.

◆ reserved()

template<typename T , class TMemInterface >
size_t task_scheduler::guarded_write_array< T, TMemInterface >::reserved ( )
inline

Reserveds this instance.

Returns
size_t.

◆ size()

template<typename T , class TMemInterface >
size_t task_scheduler::guarded_write_array< T, TMemInterface >::size ( )
inline

Sizes this instance.

Returns
size_t.

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