#[non_exhaustive]pub enum InputExtent {
PatchGrid {
time: usize,
height: usize,
width: usize,
},
AudioValidFrames(usize),
}Expand description
Host-known extent needed to plan device execution without reading a tensor back from the accelerator.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PatchGrid
Exact (time, height, width) of one image or video patch grid.
Fields
AudioValidFrames(usize)
Number of valid (unpadded) input audio frames.
Implementations§
Source§impl InputExtent
impl InputExtent
Sourcepub const fn accepts(self, modality: InputModality) -> bool
pub const fn accepts(self, modality: InputModality) -> bool
Returns whether this extent is meaningful for modality.
Trait Implementations§
Source§impl Clone for InputExtent
impl Clone for InputExtent
Source§fn clone(&self) -> InputExtent
fn clone(&self) -> InputExtent
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 Copy for InputExtent
Source§impl Debug for InputExtent
impl Debug for InputExtent
Source§impl<'de> Deserialize<'de> for InputExtent
impl<'de> Deserialize<'de> for InputExtent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InputExtent
Source§impl Hash for InputExtent
impl Hash for InputExtent
Source§impl Ord for InputExtent
impl Ord for InputExtent
Source§fn cmp(&self, other: &InputExtent) -> Ordering
fn cmp(&self, other: &InputExtent) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for InputExtent
impl PartialEq for InputExtent
Source§impl PartialOrd for InputExtent
impl PartialOrd for InputExtent
Source§impl Serialize for InputExtent
impl Serialize for InputExtent
impl StructuralPartialEq for InputExtent
Auto Trait Implementations§
impl Freeze for InputExtent
impl RefUnwindSafe for InputExtent
impl Send for InputExtent
impl Sync for InputExtent
impl Unpin for InputExtent
impl UnsafeUnpin for InputExtent
impl UnwindSafe for InputExtent
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