pub struct WhereDescriptor<const N: usize> {
pub shape: [i32; N],
pub element: ElementKind,
}Expand description
Descriptor for a where op.
shape is the output tensor shape. element is the value dtype
— cond is always u8. element must match the type parameter T
of the containing plan at select time.
No kind field because where is the only heterogeneous-dtype
ternary op in this Plan today. If future ops join (e.g., a
masked_fill variant), they get their own plan or a kind enum gets
introduced — choice deferred until that lands.
Fields§
§shape: [i32; N]Output tensor shape.
element: ElementKindValue element type (a / b / y dtype; cond is always u8).
Trait Implementations§
Source§impl<const N: usize> Clone for WhereDescriptor<N>
impl<const N: usize> Clone for WhereDescriptor<N>
Source§fn clone(&self) -> WhereDescriptor<N>
fn clone(&self) -> WhereDescriptor<N>
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 moreimpl<const N: usize> Copy for WhereDescriptor<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for WhereDescriptor<N>
impl<const N: usize> RefUnwindSafe for WhereDescriptor<N>
impl<const N: usize> Send for WhereDescriptor<N>
impl<const N: usize> Sync for WhereDescriptor<N>
impl<const N: usize> Unpin for WhereDescriptor<N>
impl<const N: usize> UnsafeUnpin for WhereDescriptor<N>
impl<const N: usize> UnwindSafe for WhereDescriptor<N>
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