pysbio
pysbio
Section titled “pysbio”Classes
Section titled “Classes”| Name | Description |
|---|---|
ContextWrapper |
|
PyDataSource |
|
PyExecution |
A minimal trampoline class for allowing Python Execution policy subclassing. |
StepIterator |
|
ZipIterator |
|
AlgWrapper |
|
BrokerGroupWrapper |
|
TypeList |
The set of Execution policies and data formats with which bindings are built. |
ZipBatch |
|
ZipStep |
Enumerations
Section titled “Enumerations”| Name | Description |
|---|---|
StorageRole |
|
StorageHint |
|
ExecutionPolicy |
|
FTraits |
|
IOPolicy |
StorageRole
Section titled “StorageRole”enum StorageRoleDefined in src/lib/pysbio/core/execution.hh:42
| Value | Description |
|---|---|
UNKNOWN |
|
Metadata |
|
Data |
|
Index |
|
Table |
StorageHint
Section titled “StorageHint”enum StorageHintDefined in src/lib/pysbio/core/execution.hh:50
| Value | Description |
|---|---|
NONE |
|
Shareable |
|
DeviceBound |
|
DoubleBuffered |
ExecutionPolicy
Section titled “ExecutionPolicy”enum ExecutionPolicyDefined in src/lib/pysbio/execution/pyexecution.hh:26
| Value | Description |
|---|---|
Serial |
|
Threaded |
|
MPI |
|
MPIThreaded |
|
Cuda |
|
ThreadedCuda |
|
MPICuda |
|
MPIThreadedCuda |
FTraits
Section titled “FTraits”enum FTraitsDefined in src/lib/pysbio/formats/pyformat_traits.hh:26
| Value | Description |
|---|---|
XTC1 |
|
XTC2 |
IOPolicy
Section titled “IOPolicy”enum IOPolicyDefined in src/lib/pysbio/io/pyio.hh:74
| Value | Description |
|---|---|
SyncPOSIX |
Typedefs
Section titled “Typedefs”| Return | Name | Description |
|---|---|---|
TypeList< sbio::SerialExecution, sbio::ThreadedExecution > |
ExecutionPolicies |
|
TypeList< > |
DataFormats |
|
sbio::StreamBroker< sbio::SyncPOSIXIO, EPolicy, FTraits > |
BrokerFor |
— Bound Types from (EPolicy, DataFormat) Pairs — /// |
BrokerFor< EPolicy, FTraits > ** |
BrokerPtrFor |
|
sbio::BrokerGroup< BrokerFor< EPolicy, FTraits >, FTraits > |
BrokerGroupFor |
|
sbio::DataSource< sbio::SyncPOSIXIO, EPolicy, FTraits > |
DataSourceFor |
|
typename impl::VariantOver< T, DataFormats, ExecutionPolicies >::type |
VariantOver |
Represents std::variant<ObjType<EPolicy, DataFormat>> for all data formats and execution policies. |
VariantOver< BrokerGroupFor > |
BrokerGroupV |
A BrokerGroup for any bound policy/format combo (see policies.hh) |
VariantOver< DataSourceFor > |
DataSourceV |
The DataSource for any supported data format/execution policy (see policies.hh) |
VariantOver< BrokerFor > |
BrokerV |
|
VariantOver< BrokerPtrFor > |
BrokerPtrV |
ExecutionPolicies
Section titled “ExecutionPolicies”using ExecutionPolicies = TypeList< sbio::SerialExecution, sbio::ThreadedExecution >Type: TypeList< sbio::SerialExecution, sbio::ThreadedExecution >
Defined in src/lib/pysbio/policies.hh:78
DataFormats
Section titled “DataFormats”using DataFormats = TypeList< >Type: TypeList< >
Defined in src/lib/pysbio/policies.hh:95
BrokerFor
Section titled “BrokerFor”using BrokerFor = sbio::StreamBroker< sbio::SyncPOSIXIO, EPolicy, FTraits >Type: sbio::StreamBroker< sbio::SyncPOSIXIO, EPolicy, FTraits >
Defined in src/lib/pysbio/policies.hh:111
— Bound Types from (EPolicy, DataFormat) Pairs — ///
BrokerPtrFor
Section titled “BrokerPtrFor”using BrokerPtrFor = BrokerFor< EPolicy, FTraits > **Type: BrokerFor< EPolicy, FTraits > **
Defined in src/lib/pysbio/policies.hh:114
BrokerGroupFor
Section titled “BrokerGroupFor”using BrokerGroupFor = sbio::BrokerGroup< BrokerFor< EPolicy, FTraits >, FTraits >Type: sbio::BrokerGroup< BrokerFor< EPolicy, FTraits >, FTraits >
Defined in src/lib/pysbio/policies.hh:117
DataSourceFor
Section titled “DataSourceFor”using DataSourceFor = sbio::DataSource< sbio::SyncPOSIXIO, EPolicy, FTraits >Type: sbio::DataSource< sbio::SyncPOSIXIO, EPolicy, FTraits >
Defined in src/lib/pysbio/policies.hh:120
VariantOver
Section titled “VariantOver”using VariantOver = typename impl::VariantOver< T, DataFormats, ExecutionPolicies >::typeType: typename impl::VariantOver< T, DataFormats, ExecutionPolicies >::type
Defined in src/lib/pysbio/policies.hh:156
Represents std::variant<ObjType<EPolicy, DataFormat>> for all data formats and execution policies.
BrokerGroupV
Section titled “BrokerGroupV”using BrokerGroupV = VariantOver< BrokerGroupFor >Type: VariantOver< BrokerGroupFor >
Defined in src/lib/pysbio/pybroker_group.hh:62
A BrokerGroup for any bound policy/format combo (see policies.hh)
DataSourceV
Section titled “DataSourceV”using DataSourceV = VariantOver< DataSourceFor >Type: VariantOver< DataSourceFor >
Defined in src/lib/pysbio/pydatasource.hh:61
The DataSource for any supported data format/execution policy (see policies.hh)
BrokerV
Section titled “BrokerV”using BrokerV = VariantOver< BrokerFor >Type: VariantOver< BrokerFor >
Defined in src/lib/pysbio/utilities.hh:54
BrokerPtrV
Section titled “BrokerPtrV”using BrokerPtrV = VariantOver< BrokerPtrFor >Type: VariantOver< BrokerPtrFor >
Defined in src/lib/pysbio/utilities.hh:55
Functions
Section titled “Functions”| Return | Name | Description |
|---|---|---|
decltype(auto) |
with_policy |
— Convert Python enums to Types — /// |
decltype(auto) |
with_format |
Call a function with the selected data format. |
EPolicy::Config |
parse_config |
Convert a Python dictionary into an Execution policy configuration. |
void |
ensure_parallel_environment |
Setup MPI for policies that require it. |
py::object |
wrap_xtc_detector |
|
std::map< std::string, std::vector< std::string > > |
alg_fields |
Process the metadata from various StreamBrokers for a detector of the given name. |
with_policy
Section titled “with_policy”template<class Fn> decltype(auto) with_policy(ExecutionPolicy epolicy, Fn && fn)Defined in src/lib/pysbio/policies.hh:166
— Convert Python enums to Types — ///
Call a function with the selected Execution policy.
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
std::runtime_error |
If this build of sbio does not support the policy. |
with_format
Section titled “with_format”template<class Fn> decltype(auto) with_format(FTraits data_fmt, Fn && fn)Defined in src/lib/pysbio/policies.hh:212
Call a function with the selected data format.
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
std::runtime_error |
If this build of sbio does not support the format. |
parse_config
Section titled “parse_config”template<class EPolicy> EPolicy::Config parse_config(const py::dict & d)Defined in src/lib/pysbio/policies.hh:242
Convert a Python dictionary into an Execution policy configuration.
ensure_parallel_environment
Section titled “ensure_parallel_environment”template<class EPolicy> void ensure_parallel_environment()Defined in src/lib/pysbio/policies.hh:297
Setup MPI for policies that require it.
wrap_xtc_detector
Section titled “wrap_xtc_detector”py::object wrap_xtc_detector(py::module & m, BrokerGroupV detv)Defined in src/lib/pysbio/pybroker_group.cc:36
alg_fields
Section titled “alg_fields”std::map< std::string, std::vector< std::string > > alg_fields(BrokerPtrV brokersv, const char * detector_name, std::size_t num_brokers, std::string & serial_number_out)Defined in src/lib/pysbio/utilities.cc:37
Process the metadata from various StreamBrokers for a detector of the given name.
This utility traverse the internal metadata structures and recomposes them into a more friendly STL mapping for algorithms and data access fields. It will also determine and format the serial number for the detector (if applicable).
Returns
Section titled “Returns”A map of algorithm names to all the data fields under them. I.e. a lookup of the form:
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
brokersv |
BrokerPtrV |
The set of StreamBrokers managing the detector. |
detector_name |
const char * |
The name of the detector to find metadata for. |
num_brokers |
std::size_t |
The total number of StreamBrokers managing the detector. |
serial_number_out |
std::string & |
Where to write the formatted serial number. |