Fast F-Matrix Methods#
- sage.algebras.fusion_rings.fast_parallel_fmats_methods.executor(params)[source]#
Execute a function defined in this module (
sage.algebras.fusion_rings.fast_parallel_fmats_methods
) in a worker process, and supply the factory parameter by constructing a reference to theFMatrix
object in the worker’s memory adress space from itsid
.INPUT:
params
– a tuple((fn_name, fmats_id), fn_args)
wherefn_name
is the name of the function to be executed,fmats_id
is theid
of theFMatrix
object, andfn_args
is a tuple containing all arguments to be passed to the functionfn_name
.
Note
When the parent process is forked, each worker gets a copy of every global variable. The virtual memory address of object \(X\) in the parent process equals the virtual memory address of the copy of object \(X\) in each worker, so we may construct references to forked copies of \(X\) using an
id
obtained in the parent process.