Skip to content

Composed

#include <sbio/execution/composed.hh>
template<class Dist, class Mem>
class Composed

Defined in src/lib/sbio/execution/composed.hh:180

Inherits: Execution< Composed< Dist, Mem > >

An Execution policy allowing composition of a DistributionManager and MemoryManager.

A DistributionManager should be setup to decide how steps are passed out, and how state is synchronized. It should cover the following APIs from Execution:

  • next, next_batch, end_iteration : For step iteration
  • should_index, pre_update, post_update : For synchronization
  • get_data : For data fetching and resolution

A MemoryManager should be setup to decide where to place the buffers and how to handle moving buffers between memory spaces. It should cover the following APIs:

  • allocate_storage : Initial allocation and placement.
  • acquire_broker_view, publish_broker_view, resolve_in_buffer, result_memory_space : Memory spaces and moving between them

Additionally, the following APIs are unique to the composition system:

  • scope_for on the DistributionManager
  • PlacementFor on the MemoryManager

The Composed class itself does nothing but forward directly to either manager. It is purely a glue structure and does not implement any behaviour.

  • Dist The distribution manager.

  • Mem The memory manager.

Name Kind Owner
ParallelSupport variable Declared here
configure_impl function Declared here
validate_environment_impl function Declared here
allocate_storage_impl function Declared here
allocate_buffer function Declared here
release_buffer function Declared here
should_index_impl function Declared here
should_process_impl function Declared here
pre_update_impl function Declared here
post_update_impl function Declared here
get_data_impl function Declared here
get_data_steps_impl function Declared here
next_impl function Declared here
next_batch_impl function Declared here
end_iteration_impl function Declared here
end_iteration_impl function Declared here
result_memory_space_impl function Declared here
required_io_capabilities_impl function Declared here
acquire_broker_view_impl function Declared here
publish_broker_view_impl function Declared here
resolve_in_buffer_impl function Declared here
DistributionManager typedef Declared here
MemoryManager typedef Declared here
Config typedef Declared here
IterationState typedef Declared here
SegmentState typedef Declared here
BufferTypeFor typedef Declared here
connect_managers function Declared here
memory_config function Declared here
allocate_node_shared_buffer function Declared here
allocate_helper function Declared here
ParallelSupport variable Inherited from Execution
result_memory_space function Inherited from Execution
configure function Inherited from Execution
validate_environment function Inherited from Execution
allocate_storage function Inherited from Execution
allocate_storage function Inherited from Execution
get_block_from_pool function Inherited from Execution
should_index function Inherited from Execution
should_process function Inherited from Execution
resolve_in_buffer function Inherited from Execution
on_step function Inherited from Execution
pre_update function Inherited from Execution
post_update function Inherited from Execution
execute_read function Inherited from Execution
acquire_broker_view function Inherited from Execution
publish_broker_view function Inherited from Execution
required_io_capabilities function Inherited from Execution
allocate_group_storage function Inherited from Execution
get_data function Inherited from Execution
fetch_then_get function Inherited from Execution
get_data_steps function Inherited from Execution
fetch_then_get_steps function Inherited from Execution
next function Inherited from Execution
next_batch function Inherited from Execution
end_iteration function Inherited from Execution
BufferTypeFor typedef Inherited from Execution
Kind Name Description
variable ParallelSupport static constexpr The set of parallelization methods supported by the Execution policy.
function result_memory_space static inline constexpr The memory space that results (via get_data) are returned in.
function configure static inline
function validate_environment static inline Verify that the runtime environment supports the EPolicy.
function allocate_storage static inline requires FormatTraits<FTraits, IO, Derived> Controls the allocation of storage.
function allocate_storage static inline requires FormatTraits<FTraits, IO, Derived>
function get_block_from_pool static inline
function should_index static inline Decide whether or not this StreamBroker should proceed to the indexing state.
function should_process static inline Decide whether or not this StreamBroker should process this particular step.
function resolve_in_buffer static inline Resolve a DataRequest for a StreamBroker into the indicated buffers.
function on_step static inline An opportunity to provide explicit synchronization immediately after every step.
function pre_update static inline An opportunity to provide explicit synchronization before any Storage changes.
function post_update static inline An opportunity to provide explicit synchronization after any Storage changes.
function execute_read static inline
function acquire_broker_view static inline
function publish_broker_view static inline Publish bytes written to a view of a buffer.
function required_io_capabilities static inline constexpr Query the capabiltiies this EPolicy requires for an IOPolicy to use it with.
function allocate_group_storage static inline requires FormatTraits<FTraits, IO, Derived>
function get_data static inline Run the data fetching and then querying of the filled buffers.
function fetch_then_get static inline Default get_data, fetching for all units, then resolving fetched data.
function get_data_steps static inline Run the data fetching and then querying of the filled buffers, for a BATCh of steps.
function fetch_then_get_steps static inline Default get_data_steps, fetching for all units, then resolving fetched data.
function next static inline Request the next step index to read data for.
function next_batch static inline Request the next contiguous batch of step indices to read data for.
function end_iteration static inline Exit the iteration with state, releasing any held steps.
typedef BufferTypeFor Sub-classes must define the used buffer types.
Return Name Description
constexprauto ParallelSupport static constexpr

static constexpr

constexprauto ParallelSupport { impl::parallel_support<Dist, Mem>() }

Type: constexprauto

Defined in src/lib/sbio/execution/composed.hh:200

Return Name Description
void configure_impl static inline — Configuration — ///
bool validate_environment_impl static inline
auto allocate_storage_impl static inline requires FormatTraits<FTraits, IO, Composed> —Storage (Memory Manager) — ///
void allocate_buffer static inline Refer to the memory manager to allocate a buffer.
void release_buffer static inline requires requires { Mem::release_buffer(buf); }
bool should_index_impl static inline requires requires { Dist::should_index_impl(); } — Distribution (Distribution Manager) — ///
bool should_process_impl static inline requires requires { Dist::template should_process_impl<FTraits>(step_idx); }
void pre_update_impl static inline requires requires { Dist::template pre_update_impl<Role, StorageT>(storage); }
void post_update_impl static inline requires requires { Dist::template post_update_impl<Role, StorageT>(storage, std::forward<SyncT>(sync_vars), status); }
IOStatus get_data_impl static inline
IOStatus get_data_steps_impl static inline
FTraits::StepIdxType next_impl static inline requires requires { Dist::template next_impl<FTraits>(state, max_capacity, std::forward<IndexTrigger>(trigger)); }
StepBatch< typename FTraits::StepIdxType > next_batch_impl static inline requires requires { Dist::template next_batch_impl<FTraits>(state, batch_size, max_capacity, std::forward<IndexTrigger>(trigger)); }
void end_iteration_impl static inline requires impl::HasTemplateEndIter<Dist, FTraits, IterState, IndexTrigger>
void end_iteration_impl static inline requires requires { Dist::end_iteration_impl(state); }
constexprMemorySpace result_memory_space_impl static inline constexpr requires requires { Mem::result_memory_space_impl(); } — Memory, and MemorySpace Handling (MemoryManager) — ///
constexprIOCapability required_io_capabilities_impl static inline constexpr requires requires { Mem::template required_io_capabilities_impl<IO>(); }
void * acquire_broker_view_impl static inline requires requires { Mem::acquire_broker_view_impl(buf); }
void publish_broker_view_impl static inline requires requires { Mem::publish_broker_view_impl(buf, view, nbytes); }
DataResult resolve_in_buffer_impl static inline requires requires { Mem::template resolve_in_buffer_impl<FTraits, IO>(storage, inv, req, cache, ptn, batch_idx); }

static inline

static inline void configure_impl(constConfig & config)

Defined in src/lib/sbio/execution/composed.hh:204

— Configuration — ///


static inline

static inline bool validate_environment_impl(constConfig & config, constchar *& error)

Defined in src/lib/sbio/execution/composed.hh:217


static inline requires FormatTraits<FTraits, IO, Composed>

template<IsRequirementsList Requirements, class IO, class FTraits> static inline auto allocate_storage_impl(constAllocationRequest< FTraits > & request) requires FormatTraits<FTraits, IO, Composed>

Defined in src/lib/sbio/execution/composed.hh:238

—Storage (Memory Manager) — ///


static inline

template<classBuffer> static inline void allocate_buffer(Buffer & buf, std::size_t size)

Defined in src/lib/sbio/execution/composed.hh:260

Refer to the memory manager to allocate a buffer.


static inline requires requires { Mem::release_buffer(buf); }

template<classBuffer> static inline void release_buffer(Buffer & buf) requires requires { Mem::release_buffer(buf); }

Defined in src/lib/sbio/execution/composed.hh:265


static inline requires requires { Dist::should_index_impl(); }

static inline bool should_index_impl() requires requires { Dist::should_index_impl(); }

Defined in src/lib/sbio/execution/composed.hh:277

— Distribution (Distribution Manager) — ///


static inline requires requires { Dist::template should_process_impl<FTraits>(step_idx); }

template<class FTraits> static inline bool should_process_impl(typename FTraits::StepIdxType & step_idx) requires requires { Dist::template should_process_impl<FTraits>(step_idx); }

Defined in src/lib/sbio/execution/composed.hh:283


static inline requires requires { Dist::template pre_update_impl<Role, StorageT>(storage); }

template<classRole, classStorageT> static inline void pre_update_impl(StorageT & storage) requires requires { Dist::template pre_update_impl<Role, StorageT>(storage); }

Defined in src/lib/sbio/execution/composed.hh:289


static inline requires requires { Dist::template post_update_impl<Role, StorageT>(storage, std::forward<SyncT>(sync_vars), status); }

template<classRole, classStorageT, classSyncT> static inline void post_update_impl(StorageT & storage, SyncT && sync_vars, IOStatus status) requires requires { Dist::template post_update_impl<Role, StorageT>(storage, std::forward<SyncT>(sync_vars), status); }

Defined in src/lib/sbio/execution/composed.hh:295


static inline

template<class FTraits, classFetchCBType, classGetCBType> static inline IOStatus get_data_impl(typename FTraits::StepIdxType step_idx, FetchCBType && unit_fetcher, std::size_t num_fetches, GetCBType && unit_get_data, std::size_t num_accesses)

Defined in src/lib/sbio/execution/composed.hh:306


static inline

template<class FTraits, classFetchCBType, classGetCBType> static inline IOStatus get_data_steps_impl(const std::initializer_list< typename FTraits::StepIdxType > steps, FetchCBType && unit_fetcher, std::size_t num_fetches, GetCBType && unit_get_data, std::size_t num_accesses)

Defined in src/lib/sbio/execution/composed.hh:340


static inline requires requires { Dist::template next_impl<FTraits>(state, max_capacity, std::forward<IndexTrigger>(trigger)); }

template<class FTraits, classIterState, classIndexTrigger> static inline FTraits::StepIdxType next_impl(IterState & state, typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger) requires requires { Dist::template next_impl<FTraits>(state, max_capacity, std::forward<IndexTrigger>(trigger)); }

Defined in src/lib/sbio/execution/composed.hh:374


static inline requires requires { Dist::template next_batch_impl<FTraits>(state, batch_size, max_capacity, std::forward<IndexTrigger>(trigger)); }

template<class FTraits, classIterState, classIndexTrigger> static inline StepBatch< typename FTraits::StepIdxType > next_batch_impl(IterState & state, std::size_t batch_size, typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger) requires requires { Dist::template next_batch_impl<FTraits>(state, batch_size, max_capacity, std::forward<IndexTrigger>(trigger)); }

Defined in src/lib/sbio/execution/composed.hh:388


static inline requires impl::HasTemplateEndIter<Dist, FTraits, IterState, IndexTrigger>

template<class FTraits, classIterState, classIndexTrigger> static inline void end_iteration_impl(IterState & state, typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger) requires impl::HasTemplateEndIter<Dist, FTraits, IterState, IndexTrigger>

Defined in src/lib/sbio/execution/composed.hh:405


static inline requires requires { Dist::end_iteration_impl(state); }

template<classIterState> static inline void end_iteration_impl(IterState & state) requires requires { Dist::end_iteration_impl(state); }

Defined in src/lib/sbio/execution/composed.hh:415


static inline constexpr requires requires { Mem::result_memory_space_impl(); }

constexpr static inline constexprMemorySpace result_memory_space_impl() requires requires { Mem::result_memory_space_impl(); }

Defined in src/lib/sbio/execution/composed.hh:424

— Memory, and MemorySpace Handling (MemoryManager) — ///


static inline constexpr requires requires { Mem::template required_io_capabilities_impl<IO>(); }

template<typename IO> constexpr static inline constexprIOCapability required_io_capabilities_impl() requires requires { Mem::template required_io_capabilities_impl<IO>(); }

Defined in src/lib/sbio/execution/composed.hh:430


static inline requires requires { Mem::acquire_broker_view_impl(buf); }

template<typenameBuffer> static inline void * acquire_broker_view_impl(Buffer & buf) requires requires { Mem::acquire_broker_view_impl(buf); }

Defined in src/lib/sbio/execution/composed.hh:446


static inline requires requires { Mem::publish_broker_view_impl(buf, view, nbytes); }

template<typenameBuffer> static inline void publish_broker_view_impl(Buffer & buf, void * view, std::size_t nbytes) requires requires { Mem::publish_broker_view_impl(buf, view, nbytes); }

Defined in src/lib/sbio/execution/composed.hh:452


static inline requires requires { Mem::template resolve_in_buffer_impl<FTraits, IO>(storage, inv, req, cache, ptn, batch_idx); }

template<class FTraits, class IO, classStorageT, classInventoryT> static inline DataResult resolve_in_buffer_impl(StorageT & storage, constInventoryT & inv, consttypename FTraits::DataRequest & req, PayloadOffsetCache & cache, typename FTraits::DataAccessPtn ptn, std::size_t batch_idx) requires requires { Mem::template resolve_in_buffer_impl<FTraits, IO>(storage, inv, req, cache, ptn, batch_idx); }

Defined in src/lib/sbio/execution/composed.hh:458

Name Description
DistributionManager
MemoryManager
Config
IterationState
SegmentState
BufferTypeFor

using DistributionManager = Dist

Defined in src/lib/sbio/execution/composed.hh:182


using MemoryManager = Mem

Defined in src/lib/sbio/execution/composed.hh:183


using Config = typenameimpl::ComposedConfig< Dist, Mem >::type

Type: typenameimpl::ComposedConfig< Dist, Mem >::type

Defined in src/lib/sbio/execution/composed.hh:185


using IterationState = typename Dist::IterationState

Type: typename Dist::IterationState

Defined in src/lib/sbio/execution/composed.hh:186


using SegmentState = typename Dist::template SegmentState< T >

Type: typename Dist::template SegmentState< T >

Defined in src/lib/sbio/execution/composed.hh:189


using BufferTypeFor = typenameimpl::ScopedBuffer< impl::scope_of< Dist, Descriptor >(), Composed, Dist, Mem, Descriptor >::type

Type: typenameimpl::ScopedBuffer< impl::scope_of< Dist, Descriptor >(), Composed, Dist, Mem, Descriptor >::type

Defined in src/lib/sbio/execution/composed.hh:192

Return Name Description
void connect_managers static inline Tell MemoryManager which parallel unit is the calling one.
constauto & memory_config static inline
void allocate_node_shared_buffer static inline Allocate a node-shared buffer with the DistributionManager.
auto allocate_helper static inline

static inline

static inline void connect_managers()

Defined in src/lib/sbio/execution/composed.hh:488

Tell MemoryManager which parallel unit is the calling one.


static inline

static inline constauto & memory_config(constConfig & config)

Defined in src/lib/sbio/execution/composed.hh:494


static inline

template<classBuffer> static inline void allocate_node_shared_buffer(Buffer & buf, std::size_t sz)

Defined in src/lib/sbio/execution/composed.hh:510

Allocate a node-shared buffer with the DistributionManager.


static inline

template<typename... Descriptors, class FTraits> static inline auto allocate_helper(RequirementsList< Descriptors... >, constAllocationRequest< FTraits > & request)

Defined in src/lib/sbio/execution/composed.hh:515