pub struct KernelRegistry { /* private fields */ }Expand description
Registry of available kernels organized by operation type and backend
Implementations§
Source§impl KernelRegistry
impl KernelRegistry
pub fn new() -> Self
pub fn register_kernel(&mut self, kernel: KernelImplementation) -> Result<()>
pub fn register_custom_kernel( &mut self, kernel: Box<dyn CustomKernel + Send + Sync>, ) -> Result<()>
pub fn get_candidates( &self, operation_type: OperationType, backend_type: BackendType, inputs: &KernelInputs, ) -> Result<Vec<KernelImplementation>>
pub fn get_kernels_for_operation( &self, operation_type: OperationType, backend_type: BackendType, ) -> Vec<KernelImplementation>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelRegistry
impl !RefUnwindSafe for KernelRegistry
impl Send for KernelRegistry
impl Sync for KernelRegistry
impl Unpin for KernelRegistry
impl UnsafeUnpin for KernelRegistry
impl !UnwindSafe for KernelRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more