pub trait ExecuteParentKernel<V: VTable>:
Debug
+ Send
+ Sync
+ 'static {
type Parent: Matcher;
// Required method
fn execute_parent(
&self,
array: &V::Array,
parent: <Self::Parent as Matcher>::Match<'_>,
child_idx: usize,
ctx: &mut ExecutionCtx,
) -> VortexResult<Option<ArrayRef>>;
}Expand description
A kernel that allows a child encoding V to execute its parent array in a fused manner.
This is the typed trait that encoding authors implement. The associated Parent type
specifies which parent array types this kernel can handle. When the parent matches,
execute_parent is called with the strongly-typed child and parent views.
Unlike reduce rules, parent kernels may read buffers and perform real computation.
Return Ok(None) to decline handling (the scheduler will try the next kernel or fall
through to the encoding’s own execute).
Required Associated Types§
Required Methods§
Sourcefn execute_parent(
&self,
array: &V::Array,
parent: <Self::Parent as Matcher>::Match<'_>,
child_idx: usize,
ctx: &mut ExecutionCtx,
) -> VortexResult<Option<ArrayRef>>
fn execute_parent( &self, array: &V::Array, parent: <Self::Parent as Matcher>::Match<'_>, child_idx: usize, ctx: &mut ExecutionCtx, ) -> VortexResult<Option<ArrayRef>>
Attempt to execute the parent array fused with the child array.