Table of Contents

Namespace NumSharp.Backends

Classes

BackendFactory

The shipped way to reach an engine: GetEngine(BackendType) is Default, and GetEngine<T>() one cached instance per engine type.

DefaultEngine

Default Tensor Engine implemented in pure micro-optimized C#.

DefaultFftEngine

NumSharp's FftEngine, the default of Fft: NumPy's numpy/fft/_pocketfft.py and numpy/fft/_helper.py statements in NumPy's order - _raw_fft's length, norm, axis and out= checks, _cook_nd_args, _raw_fftnd's axis order, the Hermitian compositions, fftfreq's arithmetic - over three protected virtual kernels that stand for NumPy's _pocketfft_umath ufuncs: C2CKernel(NDArray, int, int, bool, double, NDArray, bool, bool) (fft / ifft), R2CKernel(NDArray, int, int, double, NDArray, bool, bool) (rfft_n_even / rfft_n_odd) and C2RKernel(NDArray, int, int, double, NDArray, bool, bool) (irfft).

DefaultLinalgEngine

NumSharp's LinalgEngine, the default of Linalg: NumPy's numpy/linalg/_linalg.py statements in NumPy's order - the argument checks (_assert_stacked_2d, _assert_stacked_square, _assert_finite), the dtype rule (_commonType), the text refusals of the _umath_linalg gufuncs' input casts and each function's tail - over ten protected virtual kernels that stand for those gufuncs (CholeskyKernel(NDArray, bool), DetKernel(NDArray), SlogdetKernel(NDArray), EigKernel(NDArray, bool), EighKernel(NDArray, char, bool), InvKernel(NDArray), SolveKernel(NDArray, NDArray, bool), LstsqKernel(NDArray, NDArray, double), QrKernel(NDArray, string), SvdKernel(NDArray, bool, bool)).

MultiThread

Global configuration for NumSharp's multithreaded kernels.

Currently governs the fused 1-D dot product (numpy.dot vector·vector) for contiguous float / double inputs; other kernels remain single-threaded. Disabled by default — enable via multithreading(bool, int) so existing behavior (and bit-for-bit summation order) is unchanged unless the caller opts in.

Parallelism is gated on work size: tiny and medium reductions stay on one thread because thread fan-out (a few microseconds) would dominate. Only when there is enough work to amortize that cost are chunks dispatched across cores.

UnmanagedStorage

Serves as a typed storage for an array.

Interfaces

IBlasBackend

An external BLAS/LAPACK a TensorEngine may delegate its matrix products and factorisations to.

ISlidingDotBackend

An optional capability a IBlasBackend MAY also implement to supply the byte-parity level-1 dot product (NumPy's per-dtype dotfunc) behind the sliding multiply-accumulate family — np.correlate and np.convolve.