PyExecution
PyExecution
Section titled “PyExecution”#include <pysbio/core/execution.hh>template<classBasePolicy = sbio::SerialExecution>class PyExecutionDefined 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.
Template Parameters
Section titled “Template Parameters”BasePolicyThe base Execution policy to override from.
List of all members
Section titled “List of all members”| 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 |
Inherited from Execution
Section titled “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. |
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
PyExecution inline |
||
~PyExecution virtual inline |
PyExecution
Section titled “PyExecution”inline
inline PyExecution()Defined in src/lib/pysbio/core/execution.hh:82
~PyExecution
Section titled “~PyExecution”virtual inline
virtual inline ~PyExecution()Defined in src/lib/pysbio/core/execution.hh:84
Public Static Attributes
Section titled “Public Static Attributes”| Return | Name | Description |
|---|---|---|
constexprauto |
ParallelSupport static constexpr |
ParallelSupport
Section titled “ParallelSupport”static constexpr
constexprauto ParallelSupport = BasePolicy::ParallelSupportDefined in src/lib/pysbio/core/execution.hh:74
Public Static Methods
Section titled “Public Static Methods”| 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 |
set_active_instance
Section titled “set_active_instance”static inline
static inline void set_active_instance(PyExecution< BasePolicy > * inst)Defined in src/lib/pysbio/core/execution.hh:90
get_active_instance
Section titled “get_active_instance”static inline
static inline PyExecution< BasePolicy > * get_active_instance()Defined in src/lib/pysbio/core/execution.hh:91
allocate_storage_impl
Section titled “allocate_storage_impl”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
configure_impl
Section titled “configure_impl”static inline
template<classConfigT> static inline void configure_impl(constConfigT & config)Defined in src/lib/pysbio/core/execution.hh:108
validate_environment_impl
Section titled “validate_environment_impl”static inline
template<classConfigT> static inline bool validate_environment_impl(constConfigT & config, constchar *& error)Defined in src/lib/pysbio/core/execution.hh:113
allocate_buffer
Section titled “allocate_buffer”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 — ///
release_buffer
Section titled “release_buffer”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
result_memory_space_impl
Section titled “result_memory_space_impl”static inline constexpr
constexpr static inline constexprsbio::MemorySpace result_memory_space_impl()Defined in src/lib/pysbio/core/execution.hh:130
required_io_capabilities_impl
Section titled “required_io_capabilities_impl”static inline constexpr
template<typename IO> constexpr static inline constexprsbio::IOCapability required_io_capabilities_impl()Defined in src/lib/pysbio/core/execution.hh:135
acquire_broker_view_impl
Section titled “acquire_broker_view_impl”static inline
template<typenameBuffer> static inline void * acquire_broker_view_impl(Buffer & buf)Defined in src/lib/pysbio/core/execution.hh:140
publish_broker_view_impl
Section titled “publish_broker_view_impl”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
should_index_impl
Section titled “should_index_impl”static inline
static inline bool should_index_impl()Defined in src/lib/pysbio/core/execution.hh:151
— Distribution and Processing — ///
on_discovery_impl
Section titled “on_discovery_impl”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
should_process_impl
Section titled “should_process_impl”static inline
template<typenameFTraits> static inline bool should_process_impl(typename FTraits::StepIdxType & step_idx)Defined in src/lib/pysbio/core/execution.hh:187
pre_update_impl
Section titled “pre_update_impl”static inline
template<classRole, classStorageT> static inline void pre_update_impl(StorageT & storage)Defined in src/lib/pysbio/core/execution.hh:203
post_update_impl
Section titled “post_update_impl”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
next_impl
Section titled “next_impl”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
next_batch_impl
Section titled “next_batch_impl”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
end_iteration_impl
Section titled “end_iteration_impl”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
get_data_impl
Section titled “get_data_impl”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
get_data_steps_impl
Section titled “get_data_steps_impl”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
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
Config |
|
IterationState |
|
SegmentState |
|
BufferTypeFor |
Config
Section titled “Config”using Config = typename BasePolicy::ConfigType: typename BasePolicy::Config
Defined in src/lib/pysbio/core/execution.hh:70
IterationState
Section titled “IterationState”using IterationState = typename BasePolicy::IterationStateType: typename BasePolicy::IterationState
Defined in src/lib/pysbio/core/execution.hh:72
SegmentState
Section titled “SegmentState”using SegmentState = typename BasePolicy::template SegmentState< T >Type: typename BasePolicy::template SegmentState< T >
Defined in src/lib/pysbio/core/execution.hh:77
BufferTypeFor
Section titled “BufferTypeFor”using BufferTypeFor = typename BasePolicy::template BufferTypeFor< Descriptor >Type: typename BasePolicy::template BufferTypeFor< Descriptor >
Defined in src/lib/pysbio/core/execution.hh:80
Private Static Attributes
Section titled “Private Static Attributes”| Return | Name | Description |
|---|---|---|
thread_localPyExecution< BasePolicy > * |
s_active_instance static |
s_active_instance
Section titled “s_active_instance”static
thread_localPyExecution< BasePolicy > * s_active_instance { nullptr }Type: thread_localPyExecution< BasePolicy > *
Defined in src/lib/pysbio/core/execution.hh:415
Private Static Methods
Section titled “Private Static Methods”| Return | Name | Description |
|---|---|---|
StorageRole |
get_storage_role static inline |
|
StorageHint |
get_storage_hint static inline |
|
auto |
convert_storage static inline |
get_storage_role
Section titled “get_storage_role”static inline
template<typenameRole> static inline StorageRole get_storage_role()Defined in src/lib/pysbio/core/execution.hh:360
get_storage_hint
Section titled “get_storage_hint”static inline
template<typenameHint> static inline StorageHint get_storage_hint()Defined in src/lib/pysbio/core/execution.hh:375
convert_storage
Section titled “convert_storage”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