Skip to main content

CustomUnrollOp

Trait CustomUnrollOp 

Source
pub trait CustomUnrollOp: Op {
    // Required method
    fn unroll(&self, ctx: &mut Context, state: &mut UnrollState);

    // Provided method
    fn verify(_op: &dyn Op, _ctx: &Context) -> Result<()>
       where Self: Sized { ... }
}

Required Methods§

Source

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Provided Methods§

Source

fn verify(_op: &dyn Op, _ctx: &Context) -> Result<()>
where Self: Sized,

Trait Implementations§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CustomUnrollOp for CompositeExtractOp

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for CompositeInsertOp

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for DeclareVariableOp

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for IndexOp

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for LoadOp

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for ReinterpretCastOp

A reinterpret changes the lane count with the lane width, so one side’s pieces are not the other’s: a Vector<u32, 2> is a Vector<e4m3, 8>. When only one side exceeds the maximum, the wide side is split at the unroll factor and the narrow side is cut into matching sub-vectors with extracts and constructs. When both exceed it, the input’s pieces are reinterpreted in place and their lanes regrouped.

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for StoreOp

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for VectorExtractDynamicOp

A dynamic index reaches a lane the pass cannot name at compile time, so the unrolled parts are all searched: the index splits into the part it lands in and the lane within that part, and a select chain picks the part’s answer. The frontend documents both dynamic accessors as very slow already, and the chain is over the (comptime) number of parts, not the lanes.

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Source§

impl CustomUnrollOp for VectorInsertDynamicOp

Source§

fn unroll(&self, ctx: &mut Context, state: &mut UnrollState)

Implementors§