pub struct BinaryCmpPlan<T: Element, const N: usize> { /* private fields */ }Expand description
Binary comparison plan.
T: Element is the input element type (today: must be f32).
Output is always u8. const N: usize is the tensor rank.
Implementations§
Source§impl<T: Element, const N: usize> BinaryCmpPlan<T, N>
impl<T: Element, const N: usize> BinaryCmpPlan<T, N>
Sourcepub fn select(
_stream: &Stream,
desc: &BinaryCmpDescriptor<N>,
_pref: PlanPreference,
) -> Result<Self>
pub fn select( _stream: &Stream, desc: &BinaryCmpDescriptor<N>, _pref: PlanPreference, ) -> Result<Self>
Pick a kernel for desc. Returns Error::Unsupported if the
(kind, T::KIND) pair isn’t wired today.
Sourcepub fn can_implement(&self, args: &BinaryCmpArgs<'_, T, N>) -> Result<()>
pub fn can_implement(&self, args: &BinaryCmpArgs<'_, T, N>) -> Result<()>
Validate that this plan can launch with args.
Accepts contig and strided / broadcast operands. Same broadcast
rules as crate::BinaryPlan::can_implement.
Sourcepub fn workspace_size(&self) -> usize
pub fn workspace_size(&self) -> usize
Workspace size in bytes. Always 0 for the trailblazer.
Sourcepub fn precision_guarantee(&self) -> PrecisionGuarantee
pub fn precision_guarantee(&self) -> PrecisionGuarantee
Numerical guarantees for this plan’s kernel.
Auto Trait Implementations§
impl<T, const N: usize> Freeze for BinaryCmpPlan<T, N>
impl<T, const N: usize> RefUnwindSafe for BinaryCmpPlan<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for BinaryCmpPlan<T, N>where
T: Send,
impl<T, const N: usize> Sync for BinaryCmpPlan<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for BinaryCmpPlan<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for BinaryCmpPlan<T, N>
impl<T, const N: usize> UnwindSafe for BinaryCmpPlan<T, N>where
T: UnwindSafe,
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