pub trait MatMulBuilder<'a, T, La, Lb>{
// Required methods
fn parallelize(self) -> Self;
fn scale(self, factor: T) -> Self;
fn eval(self) -> DTensor<T, 2>;
fn overwrite<Lc: Layout>(self, c: &mut DSlice<T, 2, Lc>);
fn add_to<Lc: Layout>(self, c: &mut DSlice<T, 2, Lc>);
fn add_to_scaled<Lc: Layout>(self, c: &mut DSlice<T, 2, Lc>, beta: T);
fn special(
self,
lr: Side,
type_of_matrix: Type,
tr: Triangle,
) -> DTensor<T, 2>;
}Expand description
Builder interface for configuring matrix-matrix operations
Required Methods§
Sourcefn parallelize(self) -> Self
fn parallelize(self) -> Self
Enable parallelization.
Sourcefn overwrite<Lc: Layout>(self, c: &mut DSlice<T, 2, Lc>)
fn overwrite<Lc: Layout>(self, c: &mut DSlice<T, 2, Lc>)
Overwrites the provided slice with the result.
Sourcefn add_to_scaled<Lc: Layout>(self, c: &mut DSlice<T, 2, Lc>, beta: T)
fn add_to_scaled<Lc: Layout>(self, c: &mut DSlice<T, 2, Lc>, beta: T)
Adds the result to the provided slice after scaling the slice by beta
(i.e. C := beta * C + result).
Sourcefn special(self, lr: Side, type_of_matrix: Type, tr: Triangle) -> DTensor<T, 2>
fn special(self, lr: Side, type_of_matrix: Type, tr: Triangle) -> DTensor<T, 2>
Computes a matrix product where the first operand is a special matrix (symmetric, Hermitian, or triangular) and the other is general.
The special matrix is always treated as A. lr determines the multiplication order:
Side::Left: C := alpha * A * BSide::Right: C := alpha * B * A
§Parameters
lr- side of multiplication (left or right)type_of_matrix- special matrix type:Sym,Her, orTritr- triangle containing stored data:UpperorLower
Only the specified triangle needs to be stored for symmetric/Hermitian matrices; for triangular matrices it specifies which half is used.
§Returns
A new tensor with the result.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.