跳轉至

pysrx.gpu

CuPy when a CUDA GPU is present, NumPy/SciPy otherwise. One module-level device cache shared by registration (LF4D-Comparison) and the metrics, so gpu.clear() frees both.

pysrx.gpu

CuPy if a CUDA GPU is available, else NumPy/SciPy. Small API used by register/metrics.

cached(a)

Device copy of a host array, cached by identity (keeps at most 2 arrays resident).

map_coordinates(vol, coords, order=1, cval=np.nan)

vol: host or device array; coords: (ndim, ...) host or device. Returns device array.