pub trait ArrayKernelsExt: SessionExt {
// Provided method
fn kernels(&self) -> SessionGuard<'_, KernelSession> { ... }
}Expand description
Extension trait for accessing the optimizer kernel registry from a VortexSession.
Provided Methods§
Sourcefn kernels(&self) -> SessionGuard<'_, KernelSession>
fn kernels(&self) -> SessionGuard<'_, KernelSession>
Returns the session’s KernelSession, inserting a default one (with the built-in
kernels) if it does not exist.
The returned SessionGuard borrows the session snapshot it was read from (so the registry
stays alive even if the session is concurrently mutated) and derefs through KernelSession
to the ArrayKernels registry, so it can be used wherever an &ArrayKernels is expected.
The registry shares its storage with the session, so kernels registered through it remain
visible to the session.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".