Fast F-Matrix Methods#

sage.algebras.fusion_rings.fast_parallel_fmats_methods.executor(params)#

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 the FMatrix object in the worker’s memory adress space from its id.

INPUT:

  • params – a tuple ((fn_name, fmats_id), fn_args) where fn_name is the name of the function to be executed, fmats_id is the id of the FMatrix object, and fn_args is a tuple containing all arguments to be passed to the function fn_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.