mantidimaging.core.parallel.utility module#
Bases:
object
Bases:
object
- mantidimaging.core.parallel.utility.calculate_chunksize(cores)[source]#
TODO possible proper calculation of chunksize, although best performance has been with 1 From performance tests, the chunksize doesn’t seem to make much of a difference, but having larger chunks usually led to slower performance:
Shape: (50,512,512) 1 chunk 3.06s 2 chunks 3.05s 3 chunks 3.07s 4 chunks 3.06s 5 chunks 3.16s 6 chunks 3.06s 7 chunks 3.058s 8 chunks 3.25s 9 chunks 3.45s
- mantidimaging.core.parallel.utility.create_array(shape: tuple[int, ...], dtype: npt.DTypeLike = <class 'numpy.float32'>) SharedArray [source]#
Create an array in shared memory
- Parameters:
shape – Shape of the array
dtype – Dtype of the array
- Returns:
The created SharedArray
- mantidimaging.core.parallel.utility.execute_impl(img_num: int, partial_func: partial, is_shared_data: bool, progress: Progress, msg: str) None [source]#