Skip to content

PyExecution

#include <pysbio/core/execution.hh>
template<classBasePolicy = sbio::SerialExecution>
class PyExecution

Defined in src/lib/pysbio/core/execution.hh:68

Inherits: SerialExecution > >

A minimal trampoline class for allowing Python Execution policy subclassing.

The PyExecution class templates on a specific Execution policy to use a base and fallback for methods and mechanisms not overrided in Python. This also avoids the need and added complexity of requiring Python developers to also implement Storage class overrides.

  • BasePolicy The base Execution policy to override from.
Name Kind Owner
PyExecution function Declared here
~PyExecution function Declared here
ParallelSupport variable Declared here
set_active_instance function Declared here
get_active_instance function Declared here
allocate_storage_impl function Declared here
configure_impl function Declared here
validate_environment_impl function Declared here
allocate_buffer function Declared here
release_buffer 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
should_index_impl function Declared here
on_discovery_impl function Declared here
should_process_impl function Declared here
pre_update_impl function Declared here
post_update_impl function Declared here
next_impl function Declared here
next_batch_impl function Declared here
end_iteration_impl function Declared here
get_data_impl function Declared here
get_data_steps_impl function Declared here
Config typedef Declared here
IterationState typedef Declared here
SegmentState typedef Declared here
BufferTypeFor typedef Declared here
s_active_instance variable Declared here
get_storage_role function Declared here
get_storage_hint function Declared here
convert_storage 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
PyExecution inline
~PyExecution virtual inline

inline

inline PyExecution()

Defined in src/lib/pysbio/core/execution.hh:82


virtual inline

virtual inline ~PyExecution()

Defined in src/lib/pysbio/core/execution.hh:84

Return Name Description
constexprauto ParallelSupport static constexpr

static constexpr

constexprauto ParallelSupport = BasePolicy::ParallelSupport

Type: constexprauto

Defined in src/lib/pysbio/core/execution.hh:74

Return Name Description
void set_active_instance static inline
PyExecution< BasePolicy > * get_active_instance static inline
auto allocate_storage_impl static inline requires [sbio::FormatTraits](api-sbio-FormatTraits.md#formattraits)<FTraits, IO, PyExecution<BasePolicy>>
void configure_impl static inline
bool validate_environment_impl static inline
void allocate_buffer static inline — Memory Management — ///
void release_buffer static inline requires requires (Buffer& buf) { BasePolicy::release_buffer(buf); }
constexprsbio::MemorySpace result_memory_space_impl static inline constexpr
constexprsbio::IOCapability required_io_capabilities_impl static inline constexpr
void * acquire_broker_view_impl static inline
void publish_broker_view_impl static inline
bool should_index_impl static inline — Distribution and Processing — ///
void on_discovery_impl static inline
bool should_process_impl static inline
void pre_update_impl static inline
void post_update_impl static inline
FTraits::StepIdxType next_impl static inline
sbio::StepBatch< typename FTraits::StepIdxType > next_batch_impl static inline
void end_iteration_impl static inline
sbio::IOStatus get_data_impl static inline
sbio::IOStatus get_data_steps_impl static inline

static inline

static inline void set_active_instance(PyExecution< BasePolicy > * inst)

Defined in src/lib/pysbio/core/execution.hh:90


static inline

static inline PyExecution< BasePolicy > * get_active_instance()

Defined in src/lib/pysbio/core/execution.hh:91


static inline requires [sbio::FormatTraits](api-sbio-FormatTraits.md#formattraits)<FTraits, IO, PyExecution<BasePolicy>>

template<sbio::IsRequirementsList Requirements, class IO, classFTraits> static inline auto allocate_storage_impl(sbio::AllocationRequest< FTraits > & request) requires [sbio::FormatTraits](api-sbio-FormatTraits.md#formattraits)<FTraits, IO, PyExecution<BasePolicy>>

Defined in src/lib/pysbio/core/execution.hh:95


static inline

template<classConfigT> static inline void configure_impl(constConfigT & config)

Defined in src/lib/pysbio/core/execution.hh:108


static inline

template<classConfigT> static inline bool validate_environment_impl(constConfigT & config, constchar *& error)

Defined in src/lib/pysbio/core/execution.hh:113


static inline

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

Defined in src/lib/pysbio/core/execution.hh:120

— Memory Management — ///


static inline requires requires (Buffer& buf) { BasePolicy::release_buffer(buf); }

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

Defined in src/lib/pysbio/core/execution.hh:126


static inline constexpr

constexpr static inline constexprsbio::MemorySpace result_memory_space_impl()

Defined in src/lib/pysbio/core/execution.hh:130


static inline constexpr

template<typename IO> constexpr static inline constexprsbio::IOCapability required_io_capabilities_impl()

Defined in src/lib/pysbio/core/execution.hh:135


static inline

template<typenameBuffer> static inline void * acquire_broker_view_impl(Buffer & buf)

Defined in src/lib/pysbio/core/execution.hh:140


static inline

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

Defined in src/lib/pysbio/core/execution.hh:145


static inline

static inline bool should_index_impl()

Defined in src/lib/pysbio/core/execution.hh:151

— Distribution and Processing — ///


static inline

template<class BrokerType, classFTraits> static inline void on_discovery_impl(BrokerType & broker, typename FTraits::MetadataInventory & inv, sbio::IOStatus status)

Defined in src/lib/pysbio/core/execution.hh:165


static inline

template<typenameFTraits> static inline bool should_process_impl(typename FTraits::StepIdxType & step_idx)

Defined in src/lib/pysbio/core/execution.hh:187


static inline

template<classRole, classStorageT> static inline void pre_update_impl(StorageT & storage)

Defined in src/lib/pysbio/core/execution.hh:203


static inline

template<classRole, classStorageT, classSyncT> static inline void post_update_impl(StorageT & storage, SyncT && sync_vars, sbio::IOStatus status)

Defined in src/lib/pysbio/core/execution.hh:220


static inline

template<classFTraits, classIndexTrigger> static inline FTraits::StepIdxType next_impl(IterationState & state, typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger)

Defined in src/lib/pysbio/core/execution.hh:247


static inline

template<classFTraits, classIndexTrigger> static inline sbio::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/pysbio/core/execution.hh:270


static inline

template<classFTraits, classIndexTrigger> static inline void end_iteration_impl(IterationState & state, typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger)

Defined in src/lib/pysbio/core/execution.hh:281


static inline

template<classFTraits, classFetchCBType, classGetCBType> static inline sbio::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/pysbio/core/execution.hh:290


static inline

template<classFTraits, classFetchCBType, classGetCBType> static inline sbio::IOStatus get_data_steps_impl(const hd_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/pysbio/core/execution.hh:325

Name Description
Config
IterationState
SegmentState
BufferTypeFor

using Config = typename BasePolicy::Config

Type: typename BasePolicy::Config

Defined in src/lib/pysbio/core/execution.hh:70


using IterationState = typename BasePolicy::IterationState

Type: typename BasePolicy::IterationState

Defined in src/lib/pysbio/core/execution.hh:72


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

Type: typename BasePolicy::template SegmentState< T >

Defined in src/lib/pysbio/core/execution.hh:77


using BufferTypeFor = typename BasePolicy::template BufferTypeFor< Descriptor >

Type: typename BasePolicy::template BufferTypeFor< Descriptor >

Defined in src/lib/pysbio/core/execution.hh:80

Return Name Description
thread_localPyExecution< BasePolicy > * s_active_instance static

static

thread_localPyExecution< BasePolicy > * s_active_instance { nullptr }

Type: thread_localPyExecution< BasePolicy > *

Defined in src/lib/pysbio/core/execution.hh:415

Return Name Description
StorageRole get_storage_role static inline
StorageHint get_storage_hint static inline
auto convert_storage static inline

static inline

template<typenameRole> static inline StorageRole get_storage_role()

Defined in src/lib/pysbio/core/execution.hh:360


static inline

template<typenameHint> static inline StorageHint get_storage_hint()

Defined in src/lib/pysbio/core/execution.hh:375


static inline

template<typename... Descriptors, typenameBaseStorageT> static inline auto convert_storage(sbio::RequirementsList< Descriptors... >, BaseStorageT && base_storage)

Defined in src/lib/pysbio/core/execution.hh:388