ThreadedDistribution::IterationState
IterationState
Section titled “IterationState”#include <sbio/execution/threaded.hh>class IterationStateDefined in src/lib/sbio/execution/threaded.hh:109
Friends
Section titled “Friends”| Name | Description |
|---|---|
ThreadedDistribution |
ThreadedDistribution
Section titled “ThreadedDistribution”friend class ThreadedDistributionDefined in src/lib/sbio/execution/threaded.hh:135
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
IterationState |
Defaulted constructor. | |
IterationState inline noexcept |
||
IterationState & |
operator= inline noexcept |
IterationState
Section titled “IterationState”IterationState() = defaultDefined in src/lib/sbio/execution/threaded.hh:111
Defaulted constructor.
IterationState
Section titled “IterationState”inline noexcept
inline IterationState(IterationState && other) noexceptDefined in src/lib/sbio/execution/threaded.hh:114
operator=
Section titled “operator=”inline noexcept
inline IterationState & operator=(IterationState && other) noexceptDefined in src/lib/sbio/execution/threaded.hh:122
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
std::atomic< std::size_t > |
m_event_idx |
Thread-local index to index to distribute. |
std::atomic< std::size_t > |
m_shared_capacity |
Capacity store for inter-thread synchronization of indices. |
std::atomic< bool > |
m_exhausted |
Latch for if exhausted all indices. |
std::atomic< std::size_t > |
m_in_flight |
The number of steps handed out by next() and not yet finished processing. |
std::mutex |
m_trigger_mutex |
Mutex for thread synchronization on reindexing |
SegmentState< bool > |
m_holding_step |
Whether this thread is holding a step. |
m_event_idx
Section titled “m_event_idx”std::atomic< std::size_t > m_event_idx { 0 }Defined in src/lib/sbio/execution/threaded.hh:140
Thread-local index to index to distribute.
m_shared_capacity
Section titled “m_shared_capacity”std::atomic< std::size_t > m_shared_capacity { 0 }Defined in src/lib/sbio/execution/threaded.hh:144
Capacity store for inter-thread synchronization of indices.
m_exhausted
Section titled “m_exhausted”std::atomic< bool > m_exhausted { false }Defined in src/lib/sbio/execution/threaded.hh:148
Latch for if exhausted all indices.
m_in_flight
Section titled “m_in_flight”std::atomic< std::size_t > m_in_flight { 0 }Defined in src/lib/sbio/execution/threaded.hh:155
The number of steps handed out by next() and not yet finished processing.
A thread returns a step at the start of each next() call.
m_trigger_mutex
Section titled “m_trigger_mutex”std::mutex m_trigger_mutexDefined in src/lib/sbio/execution/threaded.hh:160
Mutex for thread synchronization on reindexing
m_holding_step
Section titled “m_holding_step”SegmentState< bool > m_holding_stepType: SegmentState< bool >
Defined in src/lib/sbio/execution/threaded.hh:162
Whether this thread is holding a step.