pub trait TryMatMul<Rhs>: HasErr {
    type Output;

    // Required method
    fn try_matmul(self, rhs: Rhs) -> Result<Self::Output, Self::Err>;

    // Provided method
    fn matmul(self, rhs: Rhs) -> Self::Output { ... }
}
Expand description

Fallible matrix multiplication. See matmul for examples.

Required Associated Types§

Required Methods§

source

fn try_matmul(self, rhs: Rhs) -> Result<Self::Output, Self::Err>

Provided Methods§

source

fn matmul(self, rhs: Rhs) -> Self::Output

Implementors§

source§

impl<B: Dim, M: Dim, K: Dim, N: Dim, E: Dtype, D, T, R> TryMatMul<Tensor<(B, K, N), E, D, R>> for Tensor<(B, M, K), E, D, T>where D: MatMatBatch3Kernel<E>, T: Tape<E, D> + Merge<R>, R: Tape<E, D>,

§

type Output = Tensor<(B, M, N), E, D, T>

source§

impl<B: Dim, M: Dim, K: Dim, N: Dim, E: Dtype, D: MatMatBrKernel<E>, T, R> TryMatMul<Tensor<(K, N), E, D, R>> for Tensor<(B, M, K), E, D, T>where T: Tape<E, D> + Merge<R>, R: Tape<E, D>,

§

type Output = Tensor<(B, M, N), E, D, T>

source§

impl<B: Dim, S: Dim, M: Dim, K: Dim, N: Dim, E: Dtype, D, T, R> TryMatMul<Tensor<(B, S, K, N), E, D, R>> for Tensor<(B, S, M, K), E, D, T>where D: MatMatBatch4Kernel<E>, T: Tape<E, D> + Merge<R>, R: Tape<E, D>,

§

type Output = Tensor<(B, S, M, N), E, D, T>

source§

impl<K: Dim, N: Dim, E: Dtype, D, T: Tape<E, D> + Merge<R>, R: Tape<E, D>> TryMatMul<Tensor<(K, N), E, D, R>> for Tensor<(K,), E, D, T>where D: MatMatKernel<E> + ReshapeKernel<E>,

§

type Output = Tensor<(N,), E, D, T>

source§

impl<M: Dim, K: Dim, E: Dtype, D, T: Tape<E, D> + Merge<R>, R: Tape<E, D>> TryMatMul<Tensor<(K,), E, D, R>> for Tensor<(M, K), E, D, T>where D: MatMatKernel<E> + ReshapeKernel<E>,

§

type Output = Tensor<(M,), E, D, T>

source§

impl<M: Dim, K: Dim, N: Dim, E: Dtype, D: MatMatKernel<E>, T, R> TryMatMul<Tensor<(K, N), E, D, R>> for Tensor<(M, K), E, D, T>where T: Tape<E, D> + Merge<R>, R: Tape<E, D>,

§

type Output = Tensor<(M, N), E, D, T>

source§

impl<M: Dim, N: Dim, E: Dtype, D, T: Tape<E, D> + Merge<R>, R: Tape<E, D>> TryMatMul<Tensor<(N,), E, D, R>> for Tensor<(M,), E, D, T>where D: MatMatKernel<E> + ReshapeKernel<E>,

§

type Output = Tensor<(M, N), E, D, T>