Enum Instruction

Source
pub enum Instruction<D: Dialect> {
Show 95 variants Metadata { info_offset: Variable<D>, split_meta: bool, out: Variable<D>, }, ExtendedMetadata { info_offset: Variable<D>, dim: Variable<D>, split_meta: bool, static_offset: u32, out: Variable<D>, }, ConstLength { length: u32, out: Variable<D>, }, SliceLength { input: Variable<D>, out: Variable<D>, }, DeclareVariable { var: Variable<D>, }, Modulo(BinaryInstruction<D>), Remainder(BinaryInstruction<D>), Add(BinaryInstruction<D>), Fma { a: Variable<D>, b: Variable<D>, c: Variable<D>, out: Variable<D>, }, Div(BinaryInstruction<D>), Mul(BinaryInstruction<D>), Sub(BinaryInstruction<D>), HiMul(BinaryInstruction<D>), Index(BinaryInstruction<D>), IndexAssign(BinaryInstruction<D>), Assign(UnaryInstruction<D>), RangeLoop { i: Variable<D>, start: Variable<D>, end: Variable<D>, step: Option<Variable<D>>, inclusive: bool, instructions: Vec<Self>, }, VecInit { inputs: Vec<Variable<D>>, out: Variable<D>, }, Loop { instructions: Vec<Self>, }, If { cond: Variable<D>, instructions: Vec<Self>, }, IfElse { cond: Variable<D>, instructions_if: Vec<Self>, instructions_else: Vec<Self>, }, Select { cond: Variable<D>, then: Variable<D>, or_else: Variable<D>, out: Variable<D>, }, Switch { value: Variable<D>, instructions_default: Vec<Self>, instructions_cases: Vec<(Variable<D>, Vec<Self>)>, }, Slice { input: Variable<D>, start: Variable<D>, end: Variable<D>, out: Variable<D>, }, CheckedSlice { input: Variable<D>, start: Variable<D>, end: Variable<D>, out: Variable<D>, len: Variable<D>, }, ReinterpretSlice { input: Variable<D>, line_size: u32, out: Variable<D>, }, Return, Break, Equal(BinaryInstruction<D>), NotEqual(BinaryInstruction<D>), Lower(BinaryInstruction<D>), Greater(BinaryInstruction<D>), LowerEqual(BinaryInstruction<D>), GreaterEqual(BinaryInstruction<D>), Erf(UnaryInstruction<D>), BitwiseOr(BinaryInstruction<D>), BitwiseAnd(BinaryInstruction<D>), BitwiseXor(BinaryInstruction<D>), CountBits(UnaryInstruction<D>), ReverseBits(UnaryInstruction<D>), ShiftLeft(BinaryInstruction<D>), ShiftRight(BinaryInstruction<D>), BitwiseNot(UnaryInstruction<D>), LeadingZeros(UnaryInstruction<D>), FindFirstSet(UnaryInstruction<D>), Abs(UnaryInstruction<D>), Exp(UnaryInstruction<D>), Log(UnaryInstruction<D>), Log1p(UnaryInstruction<D>), Cos(UnaryInstruction<D>), Sin(UnaryInstruction<D>), Tanh(UnaryInstruction<D>), Powf(BinaryInstruction<D>), Sqrt(UnaryInstruction<D>), Min(BinaryInstruction<D>), Max(BinaryInstruction<D>), Not(UnaryInstruction<D>), Or(BinaryInstruction<D>), And(BinaryInstruction<D>), Clamp { input: Variable<D>, min_value: Variable<D>, max_value: Variable<D>, out: Variable<D>, }, SyncThreads, ThreadFence, ProxySharedFence, BulkCommitGroup, BulkWaitGroup { max_pending: u32, }, BulkWaitGroupRead { max_pending: u32, }, Round(UnaryInstruction<D>), Ceil(UnaryInstruction<D>), Floor(UnaryInstruction<D>), Warp(WarpInstruction<D>), Wmma(WmmaInstruction<D>), Bitcast(UnaryInstruction<D>), AtomicLoad(UnaryInstruction<D>), AtomicStore(UnaryInstruction<D>), AtomicSwap(BinaryInstruction<D>), AtomicAdd(BinaryInstruction<D>), AtomicSub(BinaryInstruction<D>), AtomicMax(BinaryInstruction<D>), AtomicMin(BinaryInstruction<D>), AtomicAnd(BinaryInstruction<D>), AtomicOr(BinaryInstruction<D>), AtomicXor(BinaryInstruction<D>), AtomicCAS { input: Variable<D>, cmp: Variable<D>, val: Variable<D>, out: Variable<D>, }, Neg(UnaryInstruction<D>), Magnitude(UnaryInstruction<D>), Normalize(UnaryInstruction<D>), Dot(BinaryInstruction<D>), Copy { input: Variable<D>, in_index: Variable<D>, out: Variable<D>, out_index: Variable<D>, }, CopyBulk { input: Variable<D>, in_index: Variable<D>, out: Variable<D>, out_index: Variable<D>, len: u32, }, Printf { format_string: String, args: Vec<Variable<D>>, }, Comment { content: String, }, Pipeline(PipelineOps<D>), Barrier(BarrierOps<D>), MemCopyAsyncTensorSharedToGlobal { smem_buffer: Variable<D>, tensor_map: Variable<D>, indices: Vec<Variable<D>>, }, Line { file: Cow<'static, str>, line: u32, },
}

Variants§

§

Metadata

Fields

§info_offset: Variable<D>
§split_meta: bool
§out: Variable<D>
§

ExtendedMetadata

Fields

§info_offset: Variable<D>
§dim: Variable<D>
§split_meta: bool
§static_offset: u32
§out: Variable<D>
§

ConstLength

Fields

§length: u32
§out: Variable<D>
§

SliceLength

Fields

§input: Variable<D>
§out: Variable<D>
§

DeclareVariable

Fields

§var: Variable<D>
§

Modulo(BinaryInstruction<D>)

§

Remainder(BinaryInstruction<D>)

§

Add(BinaryInstruction<D>)

§

Fma

Fields

§out: Variable<D>
§

Div(BinaryInstruction<D>)

§

Mul(BinaryInstruction<D>)

§

Sub(BinaryInstruction<D>)

§

HiMul(BinaryInstruction<D>)

§

Index(BinaryInstruction<D>)

§

IndexAssign(BinaryInstruction<D>)

§

Assign(UnaryInstruction<D>)

§

RangeLoop

Fields

§start: Variable<D>
§end: Variable<D>
§step: Option<Variable<D>>
§inclusive: bool
§instructions: Vec<Self>
§

VecInit

Fields

§inputs: Vec<Variable<D>>
§out: Variable<D>
§

Loop

Fields

§instructions: Vec<Self>
§

If

Fields

§cond: Variable<D>
§instructions: Vec<Self>
§

IfElse

Fields

§cond: Variable<D>
§instructions_if: Vec<Self>
§instructions_else: Vec<Self>
§

Select

Fields

§cond: Variable<D>
§then: Variable<D>
§or_else: Variable<D>
§out: Variable<D>
§

Switch

Fields

§value: Variable<D>
§instructions_default: Vec<Self>
§instructions_cases: Vec<(Variable<D>, Vec<Self>)>
§

Slice

Fields

§input: Variable<D>
§start: Variable<D>
§end: Variable<D>
§out: Variable<D>
§

CheckedSlice

Fields

§input: Variable<D>
§start: Variable<D>
§end: Variable<D>
§out: Variable<D>
§len: Variable<D>
§

ReinterpretSlice

Fields

§input: Variable<D>
§line_size: u32
§out: Variable<D>
§

Return

§

Break

§

Equal(BinaryInstruction<D>)

§

NotEqual(BinaryInstruction<D>)

§

Lower(BinaryInstruction<D>)

§

Greater(BinaryInstruction<D>)

§

LowerEqual(BinaryInstruction<D>)

§

GreaterEqual(BinaryInstruction<D>)

§

Erf(UnaryInstruction<D>)

§

BitwiseOr(BinaryInstruction<D>)

§

BitwiseAnd(BinaryInstruction<D>)

§

BitwiseXor(BinaryInstruction<D>)

§

CountBits(UnaryInstruction<D>)

§

ReverseBits(UnaryInstruction<D>)

§

ShiftLeft(BinaryInstruction<D>)

§

ShiftRight(BinaryInstruction<D>)

§

BitwiseNot(UnaryInstruction<D>)

§

LeadingZeros(UnaryInstruction<D>)

§

FindFirstSet(UnaryInstruction<D>)

§

Abs(UnaryInstruction<D>)

§

Exp(UnaryInstruction<D>)

§

Log(UnaryInstruction<D>)

§

Log1p(UnaryInstruction<D>)

§

Cos(UnaryInstruction<D>)

§

Sin(UnaryInstruction<D>)

§

Tanh(UnaryInstruction<D>)

§

Powf(BinaryInstruction<D>)

§

Sqrt(UnaryInstruction<D>)

§

Min(BinaryInstruction<D>)

§

Max(BinaryInstruction<D>)

§

Not(UnaryInstruction<D>)

§

Or(BinaryInstruction<D>)

§

And(BinaryInstruction<D>)

§

Clamp

Fields

§input: Variable<D>
§min_value: Variable<D>
§max_value: Variable<D>
§out: Variable<D>
§

SyncThreads

§

ThreadFence

§

ProxySharedFence

§

BulkCommitGroup

§

BulkWaitGroup

Fields

§max_pending: u32
§

BulkWaitGroupRead

Fields

§max_pending: u32
§

Round(UnaryInstruction<D>)

§

Ceil(UnaryInstruction<D>)

§

Floor(UnaryInstruction<D>)

§

Warp(WarpInstruction<D>)

§

Wmma(WmmaInstruction<D>)

§

Bitcast(UnaryInstruction<D>)

§

AtomicLoad(UnaryInstruction<D>)

§

AtomicStore(UnaryInstruction<D>)

§

AtomicSwap(BinaryInstruction<D>)

§

AtomicAdd(BinaryInstruction<D>)

§

AtomicSub(BinaryInstruction<D>)

§

AtomicMax(BinaryInstruction<D>)

§

AtomicMin(BinaryInstruction<D>)

§

AtomicAnd(BinaryInstruction<D>)

§

AtomicOr(BinaryInstruction<D>)

§

AtomicXor(BinaryInstruction<D>)

§

AtomicCAS

Fields

§input: Variable<D>
§cmp: Variable<D>
§val: Variable<D>
§out: Variable<D>
§

Neg(UnaryInstruction<D>)

§

Magnitude(UnaryInstruction<D>)

§

Normalize(UnaryInstruction<D>)

§

Dot(BinaryInstruction<D>)

§

Copy

Fields

§input: Variable<D>
§in_index: Variable<D>
§out: Variable<D>
§out_index: Variable<D>
§

CopyBulk

Fields

§input: Variable<D>
§in_index: Variable<D>
§out: Variable<D>
§out_index: Variable<D>
§len: u32
§

Printf

Fields

§format_string: String
§args: Vec<Variable<D>>
§

Comment

Fields

§content: String
§

Pipeline(PipelineOps<D>)

§

Barrier(BarrierOps<D>)

§

MemCopyAsyncTensorSharedToGlobal

Fields

§smem_buffer: Variable<D>
§tensor_map: Variable<D>
§indices: Vec<Variable<D>>
§

Line

Fields

§file: Cow<'static, str>
§line: u32

Trait Implementations§

Source§

impl<D: Clone + Dialect> Clone for Instruction<D>

Source§

fn clone(&self) -> Instruction<D>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D: Debug + Dialect> Debug for Instruction<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D: Dialect> Display for Instruction<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<D> Freeze for Instruction<D>

§

impl<D> RefUnwindSafe for Instruction<D>
where D: RefUnwindSafe,

§

impl<D> Send for Instruction<D>

§

impl<D> Sync for Instruction<D>

§

impl<D> Unpin for Instruction<D>
where D: Unpin,

§

impl<D> UnwindSafe for Instruction<D>
where D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V