fusionsc.backends
Manages the active backend to use for calculation
Functions
Returns the current thread's active backend for calculations. |
|
|
Permanently installs a backend as the default for this thread. |
Returns information about the currently active backend Note Has asynchronous variant '.asnc(...)' that returns Promise[...] |
|
Connects a thread to the in-process worker. |
|
Disconnects a thread from the in-process worker |
|
Checks whether the thread is connected to the in-process worker |
|
Returns the backend corresponding to the in-process worker. |
|
Provides access to the in-process worker's "LocalResources" service interface. |
|
|
Note Has asynchronous variant '.asnc(...)' that returns Promise[...] |
|
Reconfigues the local backend to the given configuration. |
|
Temporarily overrides the active backend to use for calculations. |
Functions
- fusionsc.backends.activeBackend() Client
Returns the current thread’s active backend for calculations. This is the inner-most active useBackend call, falling back to the in-process worker if no other backend is in use
- fusionsc.backends.alwaysUseBackend(newBackend: Client)
Permanently installs a backend as the default for this thread.
Note that exiting newBackend(…) scopes also removes the backend installed by this function if it was installed inside.
- fusionsc.backends.backendInfo() Reader
Returns information about the currently active backend Note Has asynchronous variant ‘.asnc(…)’ that returns Promise[…]
- fusionsc.backends.connectLocal()
Connects a thread to the in-process worker. Automatically called for main thread.
- fusionsc.backends.disconnectLocal()
Disconnects a thread from the in-process worker
- fusionsc.backends.isLocalConnected() bool
Checks whether the thread is connected to the in-process worker
- fusionsc.backends.localBackend() Client
Returns the backend corresponding to the in-process worker. Requires the active thread to be connected to it.
- fusionsc.backends.localResources() Client
Provides access to the in-process worker’s “LocalResources” service interface.
This interface can be used to access several privileged functions (like network setup and file system access) that are not available for remote clients.
- fusionsc.backends.namedEndpoint(name: str) Any
Note Has asynchronous variant ‘.asnc(…)’ that returns Promise[…]
- fusionsc.backends.reconfigureLocalBackend(config: ReaderOrBuilder) Any
Reconfigues the local backend to the given configuration.
Note Has asynchronous variant ‘.asnc(…)’ that returns Promise[…]
- fusionsc.backends.useBackend(newBackend: Client)
Temporarily overrides the active backend to use for calculations.
- Example usage::
import fusionsc as fsc … newBackend = … with fsc.backends.useBackend(newBackend):
… Calculation code …