Skip to main content

MatmulBuilder

Trait MatmulBuilder 

Source
pub trait MatmulBuilder<'a, T, D0, D1, D2, La, Lb>
where T: 'a, D0: Dim, D1: Dim, D2: Dim, La: 'a + Layout, Lb: 'a + Layout,
{ // Required methods fn scale(self, factor: T) -> Self; fn eval(self) -> Array<T, (D0, D2)>; fn write<Lc: Layout>(self, c: &mut Slice<T, (D0, D2), Lc>); fn add_to<Lc: Layout>(self, c: &mut Slice<T, (D0, D2), Lc>); fn add_to_scaled<Lc: Layout>(self, c: &mut Slice<T, (D0, D2), Lc>, beta: T); }
Expand description

Builder interface for configuring matrix-matrix operations

Required Methods§

Source

fn scale(self, factor: T) -> Self

Multiplies the result by a scalar factor.

Source

fn eval(self) -> Array<T, (D0, D2)>

Returns a new owned tensor containing the result.

Source

fn write<Lc: Layout>(self, c: &mut Slice<T, (D0, D2), Lc>)

Overwrites the provided slice with the result.

Source

fn add_to<Lc: Layout>(self, c: &mut Slice<T, (D0, D2), Lc>)

Adds the result to the provided slice.

Source

fn add_to_scaled<Lc: Layout>(self, c: &mut Slice<T, (D0, D2), Lc>, beta: T)

Adds the result to the provided slice after scaling the slice by beta (i.e. C := beta * C + result).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§