Skip to content

ThreadedDistribution::IterationState

#include <sbio/execution/threaded.hh>
class IterationState

Defined in src/lib/sbio/execution/threaded.hh:109

Name Description
ThreadedDistribution

friend class ThreadedDistribution

Defined in src/lib/sbio/execution/threaded.hh:135

Return Name Description
IterationState Defaulted constructor.
IterationState inline noexcept
IterationState & operator= inline noexcept

IterationState() = default

Defined in src/lib/sbio/execution/threaded.hh:111

Defaulted constructor.


inline noexcept

inline IterationState(IterationState && other) noexcept

Defined in src/lib/sbio/execution/threaded.hh:114


inline noexcept

inline IterationState & operator=(IterationState && other) noexcept

Defined in src/lib/sbio/execution/threaded.hh:122

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.

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.


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.


std::atomic< bool > m_exhausted { false }

Defined in src/lib/sbio/execution/threaded.hh:148

Latch for if exhausted all indices.


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.


std::mutex m_trigger_mutex

Defined in src/lib/sbio/execution/threaded.hh:160

Mutex for thread synchronization on reindexing


SegmentState< bool > m_holding_step

Type: SegmentState< bool >

Defined in src/lib/sbio/execution/threaded.hh:162

Whether this thread is holding a step.