Telamon
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
telamon_simulator::WaitFreeSimulatorHandle< LockFree, N > Class Template Reference

A handle class which is used to obtain access to the wait-free simulator. More...

#include <WaitFreeSimulator.hh>

Classes

Public Types

using Id = int
 
using Input = typename LockFree::Input
 
using Output = typename LockFree::Output
 
using Commit = typename LockFree::Commit
 
using OpRecord = OperationRecord< LockFree >
 
using OpBox = OperationRecordBox< LockFree >
 
using OpState = typename OperationRecord< LockFree >::OperationState
 
template<typename T , typename Err = std::monostate>
using OptionalResultOrError = nonstd::expected< std::optional< T >, Err >
 
using Simulator = telamon_private::WaitFreeSimulator< LockFree, N >
 

Public Member Functions

 WaitFreeSimulatorHandle (LockFree algorithm)
 
auto fork () -> std::optional< WaitFreeSimulatorHandle< LockFree, N >>
 
template<typename Fun , typename RetVal >
auto fork (Fun &&fun) -> std::optional< RetVal >
 
auto retire () -> void
 
auto submit (const Input &input, bool use_slow_path=false) -> Output
 
auto help () -> void
 

Static Public Attributes

static constexpr bool Use_slow_path = true
 
static constexpr bool Use_fast_path = false
 

Detailed Description

template<NormalizedRepresentation LockFree, const int N = 16>
class telamon_simulator::WaitFreeSimulatorHandle< LockFree, N >

A handle class which is used to obtain access to the wait-free simulator.


Class Documentation

◆ telamon_simulator::WaitFreeSimulatorHandle::MetaData

struct telamon_simulator::WaitFreeSimulatorHandle::MetaData

template<NormalizedRepresentation LockFree, const int N = 16>
struct telamon_simulator::WaitFreeSimulatorHandle< LockFree, N >::MetaData

A class which represents the meta data of the handle class. Used only when forking a handle from another and then retiring a handle.

Class Members
vector< Id > m_free
mutex m_free_lock

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