pub struct WherePlan<T: Element, const N: usize> { /* private fields */ }Expand description
where(cond, a, b) plan with heterogeneous-dtype inputs.
T: Element is the value dtype (a / b / y). The cond is always u8.
const N: usize is the tensor rank.
Implementations§
Source§impl<T: Element, const N: usize> WherePlan<T, N>
impl<T: Element, const N: usize> WherePlan<T, N>
Sourcepub fn select(
_stream: &Stream,
desc: &WhereDescriptor<N>,
_pref: PlanPreference,
) -> Result<Self>
pub fn select( _stream: &Stream, desc: &WhereDescriptor<N>, _pref: PlanPreference, ) -> Result<Self>
Pick a kernel for desc. Returns Error::Unsupported if the
value dtype isn’t wired today.
Sourcepub fn can_implement(&self, args: &WhereArgs<'_, T, N>) -> Result<()>
pub fn can_implement(&self, args: &WhereArgs<'_, T, N>) -> Result<()>
Validate that this plan can launch with args.
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 WherePlan<T, N>
impl<T, const N: usize> RefUnwindSafe for WherePlan<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for WherePlan<T, N>where
T: Send,
impl<T, const N: usize> Sync for WherePlan<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for WherePlan<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for WherePlan<T, N>
impl<T, const N: usize> UnwindSafe for WherePlan<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