SerialDistribution
SerialDistribution
Section titled “SerialDistribution”#include <sbio/execution/serial.hh>class SerialDistributionDefined in src/lib/sbio/execution/serial.hh:51
SerialDistribution is a simple distribution using a single process and thread.
This distribution manager provides purely synchronous behaviour. Every buffer in the manager is a shared buffer (there’s only 1 parallel unit).
The SerialExecution alias below composes this manager with host-memory.
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexpr std::bitset< static_cast< std::size_t >(ParallelizationMethods::NUM_METHODS) > |
ParallelSupport static constexpr |
ParallelSupport
Section titled “ParallelSupport”static constexpr
constexpr std::bitset< static_cast< std::size_t >(ParallelizationMethods::NUM_METHODS) > ParallelSupport { 0x0 }Type: constexpr std::bitset< static_cast< std::size_t >(ParallelizationMethods::NUM_METHODS) >
Defined in src/lib/sbio/execution/serial.hh:58
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
void |
configure_impl static inline |
|
constexpr std::size_t |
unit_ordinal static inline constexpr |
The ordinal (associated number) for the calling parallel unit. |
void |
init_logger static inline |
Setup a spdlog logger. |
FTraits::StepIdxType |
next_impl static inline |
The SerialExecution policy generates step indices in monotonically. |
StepBatch< typename FTraits::StepIdxType > |
next_batch_impl static inline |
The SerialExecution policy hands out contiguous batches of steps. |
configure_impl
Section titled “configure_impl”static inline
static inline void configure_impl(const Config &)Defined in src/lib/sbio/execution/serial.hh:60
unit_ordinal
Section titled “unit_ordinal”static inline constexpr
constexpr static inline constexpr std::size_t unit_ordinal()Defined in src/lib/sbio/execution/serial.hh:77
The ordinal (associated number) for the calling parallel unit.
init_logger
Section titled “init_logger”static inline
static inline void init_logger()Defined in src/lib/sbio/execution/serial.hh:82
Setup a spdlog logger.
next_impl
Section titled “next_impl”static inline
template<class FTraits, class IndexTrigger> static inline FTraits::StepIdxType next_impl(IterationState & state, typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger)Defined in src/lib/sbio/execution/serial.hh:113
The SerialExecution policy generates step indices in monotonically.
The policy will continuously increment the step counter, returning the next index until exhaustion. It will then use the callback trigger to reindex.
Returns
Section titled “Returns”The next step_idx.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
max_capacity |
typename FTraits::StepIdxType & |
The current max capacity (currently available indices). |
trigger |
IndexTrigger && |
The reindex callback routine. |
next_batch_impl
Section titled “next_batch_impl”static inline
template<class FTraits, class IndexTrigger> static inline StepBatch< typename FTraits::StepIdxType > next_batch_impl(IterationState & state, std::size_t batch_size, typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger)Defined in src/lib/sbio/execution/serial.hh:154
The SerialExecution policy hands out contiguous batches of steps.
Like next_impl, the reindexing trigger is called once capacity is reached.
Returns
Section titled “Returns”The next batch of steps.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
batch_size |
std::size_t |
The maximum number of steps in the batch. |
max_capacity |
typename FTraits::StepIdxType & |
The current max capacity (currently available indices). |
trigger |
IndexTrigger && |
The reindex callback routine. |
Private Static Attributes
Section titled “Private Static Attributes”| Return | Name | Description |
|---|---|---|
std::shared_ptr< spdlog::logger > |
m_logger static |
m_logger
Section titled “m_logger”static
std::shared_ptr< spdlog::logger > m_loggerDefined in src/lib/sbio/execution/serial.hh:173