register_kernel

function of dascore.core.processor source

register_kernel(
    cls: type[type[PatchProcessor], str] ,
    backend: str | tuple[str, tuple[str, …]] ,
)

Say that a function is how an operation runs on given array backends.

Used as a decorator. The kernel has the class’s own kernel signature, (processor, data, **plan), and returns an array.

Parameters

Parameter Description
cls The processor the kernel belongs to, or its registry tag.
backend The backend it is for, as
backend_name spells
it – “numpy”, “cupy”, “dask” – or a tuple of them.