Skip to main content

Module kernels

Module kernels 

Source
Expand description

Session-scoped registry for optimizer kernels.

ArrayKernels stores function pointers that participate in array optimization and execution without adding rules or kernels to an encoding vtable. The optimizer consults it for parent-reduce rewrites before the child encoding’s static PARENT_RULES, and the executor consults it for parent execution before the child encoding’s static parent kernels. A registered function can therefore add support for an extension encoding or take precedence over a built-in rule or kernel. When several functions are registered for the same key and kind, they are tried in registration order until one applies.

Kernel entries are addressed by (outer_id, child_id). For parent-reduce and execute-parent kernels, outer_id is the id returned by the parent array’s encoding_id() and child_id is the child array’s encoding_id(). For ScalarFn parents, the parent id is the scalar function id.

Because registered functions have different signatures for each kernel kind, the registry maintains one storage map per function type rather than a single type-erased map.

Sessions created by the top-level vortex crate install the default registry. Other sessions can add it with VortexSession::with or rely on ArrayKernelsExt::kernels to insert the default value.

Structs§

ArrayKernels
Session-scoped registry of optimizer kernel functions.

Traits§

ArrayKernelsExt
Extension trait for accessing optimizer kernels from a VortexSession.

Type Aliases§

ExecuteParentFn
Function pointer for a plugin-provided parent execution.
ReduceParentFn
Function pointer for a plugin-provided parent-reduce rewrite.