TensorLinalgPrims

Trait TensorLinalgPrims 

Source
pub trait TensorLinalgPrims<T: KernelLinalgScalar> {
    type Context;

Show 15 methods // Required methods fn has_linalg_support(op: LinalgCapabilityOp) -> bool; fn solve_ex( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, ) -> Result<SolveTensorExResult<T>>; fn solve( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, ) -> Result<Tensor<T>>; fn lu_solve( ctx: &mut Self::Context, factors: &Tensor<T>, pivots: &Tensor<i32>, b: &Tensor<T>, ) -> Result<Tensor<T>>; fn solve_triangular( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, upper: bool, ) -> Result<Tensor<T>>; fn qr(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<QrTensorResult<T>>; fn thin_svd( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<SvdTensorResult<T>>; fn svdvals( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<Tensor<T::Real>>; fn lu_factor_ex( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorExResult<T>>; fn lu_factor( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorResult<T>>; fn lu_factor_no_pivot( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorResult<T>>; fn cholesky_ex( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<CholeskyTensorExResult<T>>; fn cholesky(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<Tensor<T>>; fn eigen_sym( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<EigenTensorResult<T>>; fn eig(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<EigTensorResult<T>>;
}

Required Associated Types§

Required Methods§

Source

fn has_linalg_support(op: LinalgCapabilityOp) -> bool

Source

fn solve_ex( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, ) -> Result<SolveTensorExResult<T>>

Solve a square linear system while returning per-batch numerical status.

§Examples
use tenferro_linalg_prims::TensorLinalgPrims;

fn accepts_backend<B: TensorLinalgPrims<f64>>() {}
let _ = accepts_backend::<todo!()>;
Source

fn solve( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, ) -> Result<Tensor<T>>

Source

fn lu_solve( ctx: &mut Self::Context, factors: &Tensor<T>, pivots: &Tensor<i32>, b: &Tensor<T>, ) -> Result<Tensor<T>>

Source

fn solve_triangular( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, upper: bool, ) -> Result<Tensor<T>>

Source

fn qr(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<QrTensorResult<T>>

Source

fn thin_svd( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<SvdTensorResult<T>>

Source

fn svdvals(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<Tensor<T::Real>>

Source

fn lu_factor_ex( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorExResult<T>>

Compute an LU factorization while returning per-batch numerical status.

§Examples
use tenferro_linalg_prims::TensorLinalgPrims;

fn accepts_backend<B: TensorLinalgPrims<f64>>() {}
let _ = accepts_backend::<todo!()>;
Source

fn lu_factor( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorResult<T>>

Source

fn lu_factor_no_pivot( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorResult<T>>

Compute an LU factorization without pivoting.

Backends may support this only on a subset of devices or dtypes.

§Examples
use tenferro_linalg_prims::TensorLinalgPrims;

fn accepts_backend<B: TensorLinalgPrims<f64>>() {}
let _ = accepts_backend::<todo!()>;
Source

fn cholesky_ex( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<CholeskyTensorExResult<T>>

Compute a Cholesky factorization while returning per-batch numerical status.

§Examples
use tenferro_linalg_prims::TensorLinalgPrims;

fn accepts_backend<B: TensorLinalgPrims<f64>>() {}
let _ = accepts_backend::<todo!()>;
Source

fn cholesky(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<Tensor<T>>

Source

fn eigen_sym( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<EigenTensorResult<T>>

Source

fn eig(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<EigTensorResult<T>>

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.

Implementors§