pub struct ElementwiseSpec<'a> {
pub count: u32,
pub inputs: &'a [Operand],
pub output: Operand,
pub dims: [u32; 6],
pub strides: &'a [[u32; 6]],
pub clamp: Option<[u32; 2]>,
}Expand description
Specialization payload of an elementwise dispatch. The declaration order in the elementwise
kernel is: count, each input operand, the output operand, then (broadcast
only) the output dims and each input’s element strides, then the clamp bounds.
Fields§
§count: u32§inputs: &'a [Operand]§output: Operand§dims: [u32; 6]Output shape padded with leading ones to MAX_RANK.
strides: &'a [[u32; 6]]Per input, element strides over dims (0 along a broadcast dimension).
clamp: Option<[u32; 2]>CLAMP bounds as FP32 bit patterns.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for ElementwiseSpec<'a>
impl<'a> Clone for ElementwiseSpec<'a>
Source§fn clone(&self) -> ElementwiseSpec<'a>
fn clone(&self) -> ElementwiseSpec<'a>
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 moreSource§impl<'a> Debug for ElementwiseSpec<'a>
impl<'a> Debug for ElementwiseSpec<'a>
impl<'a> Eq for ElementwiseSpec<'a>
Source§impl<'a> PartialEq for ElementwiseSpec<'a>
impl<'a> PartialEq for ElementwiseSpec<'a>
Source§fn eq(&self, other: &ElementwiseSpec<'a>) -> bool
fn eq(&self, other: &ElementwiseSpec<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for ElementwiseSpec<'a>
Auto Trait Implementations§
impl<'a> Freeze for ElementwiseSpec<'a>
impl<'a> RefUnwindSafe for ElementwiseSpec<'a>
impl<'a> Send for ElementwiseSpec<'a>
impl<'a> Sync for ElementwiseSpec<'a>
impl<'a> Unpin for ElementwiseSpec<'a>
impl<'a> UnsafeUnpin for ElementwiseSpec<'a>
impl<'a> UnwindSafe for ElementwiseSpec<'a>
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