nabu.processing.convolution_cuda
source module nabu.processing.convolution_cuda
Classes
-
Convolution — A class for performing convolution on GPU with CUDA, but without using textures (unlike for example in
silx.opencl.convolution)
source class Convolution(shape, kernel, axes=None, mode=None, extra_options=None, cuda_options=None)
A class for performing convolution on GPU with CUDA, but without using
textures (unlike for example in silx.opencl.convolution)
Constructor of Cuda Convolution.
Parameters
-
shape : tuple — Shape of the array.
-
kernel : array-like — Convolution kernel (1D, 2D or 3D).
-
axes : tuple, optional — Axes along which the convolution is performed, for batched convolutions.
-
mode : str, optional — Boundary handling mode. Available modes are: - "reflect": cba|abcd|dcb - "nearest": aaa|abcd|ddd - "wrap": bcd|abcd|abc - "constant": 000|abcd|000
Default is "reflect".
-
extra_options : dict, optional — Advanced options (dict). Current options are: - "allocate_input_array": True - "allocate_output_array": True - "allocate_tmp_array": True - "sourcemodule_kwargs": {} - "batch_along_flat_dims": True
Methods
-
convolve — Convolve an array with the class kernel.
source method Convolution.convolve(array, output=None)
Convolve an array with the class kernel.
:param array: Input array. Can be numpy.ndarray or cupy array :param output: Output array. Can be numpy.ndarray or cupy array