pystack3d.utils_multiprocessing module
utilities functions related to multiprocessing
Return components related to a multiprocessing.sharedctypes.Array created from ‘arr’
- pystack3d.utils_multiprocessing.worker_init(queue_incr, barrier, shared_stats, shape_stats, dtype_stats, shared_array, shape_array, dtype_array, shared_array2, shape_array2, dtype_array2)
Initialize the workers
- pystack3d.utils_multiprocessing.np_from_array(shared, shape, dtype)
Return array from shared object in buffer
- pystack3d.utils_multiprocessing.step_wrapper(process_step, kwargs)
Wrapper function to pass kwargs in the case of multiprocessing. Must be defined as a ‘free’ function so all independent workers can have access to it
- Parameters:
process_step (str) – name of the process step (example ‘cropping’)
kwargs (dict) – dictionary arguments passed to the process step
- pystack3d.utils_multiprocessing.initialize_args(process_step, params, nproc, shape)
parameters for shared array in multiprocessing
Collect the array partition sent by workers
Return the shared array resulting from the arrays collect