pub trait Kernel:
'static
+ Send
+ Sync
+ Debug {
// Required method
fn invoke(&self, args: &InvocationArgs<'_>) -> VortexResult<Option<Output>>;
}
Expand description
Compute functions can ask arrays for compute kernels for a given invocation.
The kernel is invoked with the input arguments and options, and can return None
if it is
unable to compute the result for the given inputs due to missing implementation logic.
For example, if kernel doesn’t support the LTE
operator. By returning None
, the kernel
is indicating that it cannot compute the result for the given inputs, and another kernel should
be tried. Not that the given inputs are invalid for the compute function.
If the kernel fails to compute a result, it should return a Some
with the error.
Required Methods§
Sourcefn invoke(&self, args: &InvocationArgs<'_>) -> VortexResult<Option<Output>>
fn invoke(&self, args: &InvocationArgs<'_>) -> VortexResult<Option<Output>>
Invokes the kernel with the given input arguments and options.