PyExecution
PyExecution
Section titled “PyExecution”#include <pysbio/core/execution.hh>template<classBasePolicy = sbio::SerialExecution>class PyExecutionDefined in src/lib/pysbio/core/execution.hh:67
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 |
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 |
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 |
get_data_impl |
function |
Declared here |
get_data_steps_impl |
function |
Declared here |
Config |
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 |
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 |
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 |
allocate_group_storage |
function |
Inherited from Execution |
get_data |
function |
Inherited from Execution |
get_data_steps |
function |
Inherited from Execution |
next |
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 |
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 |
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 |
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 |
get_data_steps static inline |
Run the data fetching and then querying of the filled buffers, for a BATCh of steps. |
function |
next static inline |
Request the next step index to read data for. |
typedef |
BufferTypeFor |
Sub-classes must define the used buffer types. |
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
PyExecution inline |
PyExecution
Section titled “PyExecution”inline
inline PyExecution()Defined in src/lib/pysbio/core/execution.hh:75
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:70
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 |
should_index_impl static inline |
|
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::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:83
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:84
allocate_storage_impl
Section titled “allocate_storage_impl”static inline requires [sbio::FormatTraits](api-sbio-FormatTraits.md#formattraits)<FTraits, IO, PyExecution<BasePolicy>>
template<sbio::IsTypeList 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:88
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:101
should_index_impl
Section titled “should_index_impl”static inline
static inline bool should_index_impl()Defined in src/lib/pysbio/core/execution.hh:105
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:119
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:141
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:157
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:174
next_impl
Section titled “next_impl”static inline
template<classFTraits, classIndexTrigger> static inline FTraits::StepIdxType next_impl(typename FTraits::StepIdxType & max_capacity, IndexTrigger && trigger)Defined in src/lib/pysbio/core/execution.hh:201
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:220
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:255
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
Config |
|
BufferTypeFor |
Config
Section titled “Config”using Config = typename BasePolicy::ConfigDefined in src/lib/pysbio/core/execution.hh:69
BufferTypeFor
Section titled “BufferTypeFor”using BufferTypeFor = typename BasePolicy::template BufferTypeFor< Descriptor >Defined in src/lib/pysbio/core/execution.hh:73
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 { }Defined in src/lib/pysbio/core/execution.hh:339
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:290
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:307
convert_storage
Section titled “convert_storage”static inline
template<typename... Descriptors, typenameBaseStorageT> static inline auto convert_storage(sbio::TypeList< Descriptors... >, BaseStorageT && base_storage)Defined in src/lib/pysbio/core/execution.hh:320