fusionsc.backends

Manages the active backend to use for calculation

Functions

activeBackend()

Returns the current thread's active backend for calculations.

alwaysUseBackend(newBackend)

Permanently installs a backend as the default for this thread.

backendInfo()

Returns information about the currently active backend Note Has asynchronous variant '.asnc(...)' that returns Promise[...]

connectLocal()

Connects a thread to the in-process worker.

disconnectLocal()

Disconnects a thread from the in-process worker

isLocalConnected()

Checks whether the thread is connected to the in-process worker

localBackend()

Returns the backend corresponding to the in-process worker.

localResources()

Provides access to the in-process worker's "LocalResources" service interface.

reconfigureLocalBackend(config)

Reconfigues the local backend to the given configuration.

useBackend(newBackend)

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