pub struct CacheKernelIr { /* private fields */ }Expand description
Validated IR for a kernel that populates multiple cache outputs.
Implementations§
Source§impl CacheKernelIr
impl CacheKernelIr
Sourcepub fn new(
values: Vec<KernelValue>,
outputs: Vec<KernelValueId>,
) -> Result<Self, KernelIrError>
pub fn new( values: Vec<KernelValue>, outputs: Vec<KernelValueId>, ) -> Result<Self, KernelIrError>
Validates values and constructs a cache kernel with the given outputs.
§Errors
Returns KernelIrError when outputs is empty, an output or operand
is out of bounds, values are not topologically ordered, or a value’s
kind, class, or shape is inconsistent with its instruction.
Sourcepub fn values(&self) -> &[KernelValue]
pub fn values(&self) -> &[KernelValue]
Returns all IR values in topological order.
Sourcepub fn outputs(&self) -> &[KernelValueId]
pub fn outputs(&self) -> &[KernelValueId]
Returns cache output identifiers in storage order.
Trait Implementations§
Source§impl Clone for CacheKernelIr
impl Clone for CacheKernelIr
Source§fn clone(&self) -> CacheKernelIr
fn clone(&self) -> CacheKernelIr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CacheKernelIr
impl RefUnwindSafe for CacheKernelIr
impl Send for CacheKernelIr
impl Sync for CacheKernelIr
impl Unpin for CacheKernelIr
impl UnsafeUnpin for CacheKernelIr
impl UnwindSafe for CacheKernelIr
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