Skip to content

pysbio

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
Name Description
StorageRole
StorageHint
ExecutionPolicy
FTraits
IOPolicy

enum StorageRole

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

Value Description
UNKNOWN
Metadata
Data
Index
Table

enum StorageHint

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

Value Description
NONE
Shareable
DeviceBound
DoubleBuffered

enum ExecutionPolicy

Defined in src/lib/pysbio/execution/pyexecution.hh:26

Value Description
Serial
Threaded
MPI
MPIThreaded
Cuda
ThreadedCuda
MPICuda
MPIThreadedCuda

enum FTraits

Defined in src/lib/pysbio/formats/pyformat_traits.hh:26

Value Description
XTC1
XTC2

enum IOPolicy

Defined in src/lib/pysbio/io/pyio.hh:74

Value Description
SyncPOSIX
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

using ExecutionPolicies = TypeList< sbio::SerialExecution, sbio::ThreadedExecution >

Type: TypeList< sbio::SerialExecution, sbio::ThreadedExecution >

Defined in src/lib/pysbio/policies.hh:78


using DataFormats = TypeList< >

Type: TypeList< >

Defined in src/lib/pysbio/policies.hh:95


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 — ///


using BrokerPtrFor = BrokerFor< EPolicy, FTraits > **

Type: BrokerFor< EPolicy, FTraits > **

Defined in src/lib/pysbio/policies.hh:114


using BrokerGroupFor = sbio::BrokerGroup< BrokerFor< EPolicy, FTraits >, FTraits >

Type: sbio::BrokerGroup< BrokerFor< EPolicy, FTraits >, FTraits >

Defined in src/lib/pysbio/policies.hh:117


using DataSourceFor = sbio::DataSource< sbio::SyncPOSIXIO, EPolicy, FTraits >

Type: sbio::DataSource< sbio::SyncPOSIXIO, EPolicy, FTraits >

Defined in src/lib/pysbio/policies.hh:120


using VariantOver = typename impl::VariantOver< T, DataFormats, ExecutionPolicies >::type

Type: 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.


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)


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)


using BrokerV = VariantOver< BrokerFor >

Type: VariantOver< BrokerFor >

Defined in src/lib/pysbio/utilities.hh:54


using BrokerPtrV = VariantOver< BrokerPtrFor >

Type: VariantOver< BrokerPtrFor >

Defined in src/lib/pysbio/utilities.hh:55

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.

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.

Exception Description
std::runtime_error If this build of sbio does not support the policy.

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.

Exception Description
std::runtime_error If this build of sbio does not support the format.

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.


template<class EPolicy> void ensure_parallel_environment()

Defined in src/lib/pysbio/policies.hh:297

Setup MPI for policies that require it.


py::object wrap_xtc_detector(py::module & m, BrokerGroupV detv)

Defined in src/lib/pysbio/pybroker_group.cc:36


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).

A map of algorithm names to all the data fields under them. I.e. a lookup of the form: : [, ].

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.