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 theFMatrixobject in the worker’s memory address space from itsid.INPUT:
params– tuple((fn_name, fmats_id), fn_args)wherefn_nameis the name of the function to be executed,fmats_idis theidof theFMatrixobject, andfn_argsis 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
idobtained in the parent process.