pub trait TensorLinalgBackend<T>where
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>, Error>;
fn solve(
ctx: &mut Self::Context,
a: &Tensor<T>,
b: &Tensor<T>,
) -> Result<Tensor<T>, Error>;
fn lu_solve(
ctx: &mut Self::Context,
factors: &Tensor<T>,
pivots: &Tensor<i32>,
b: &Tensor<T>,
) -> Result<Tensor<T>, Error>;
fn solve_triangular(
ctx: &mut Self::Context,
a: &Tensor<T>,
b: &Tensor<T>,
upper: bool,
) -> Result<Tensor<T>, Error>;
fn qr(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<QrTensorResult<T>, Error>;
fn thin_svd(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<SvdTensorResult<T>, Error>;
fn svdvals(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<Tensor<<T as LinalgScalar>::Real>, Error>;
fn lu_factor_ex(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<LuTensorExResult<T>, Error>;
fn lu_factor(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<LuTensorResult<T>, Error>;
fn lu_factor_no_pivot(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<LuTensorResult<T>, Error>;
fn cholesky_ex(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<CholeskyTensorExResult<T>, Error>;
fn cholesky(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<Tensor<T>, Error>;
fn eigen_sym(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<EigenTensorResult<T>, Error>;
fn eig(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<EigTensorResult<T>, Error>;
}Required Associated Types§
Required Methods§
fn has_linalg_support(op: LinalgCapabilityOp) -> bool
Sourcefn solve_ex(
ctx: &mut Self::Context,
a: &Tensor<T>,
b: &Tensor<T>,
) -> Result<SolveTensorExResult<T>, Error>
fn solve_ex( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, ) -> Result<SolveTensorExResult<T>, Error>
fn solve( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, ) -> Result<Tensor<T>, Error>
fn lu_solve( ctx: &mut Self::Context, factors: &Tensor<T>, pivots: &Tensor<i32>, b: &Tensor<T>, ) -> Result<Tensor<T>, Error>
fn solve_triangular( ctx: &mut Self::Context, a: &Tensor<T>, b: &Tensor<T>, upper: bool, ) -> Result<Tensor<T>, Error>
fn qr( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<QrTensorResult<T>, Error>
fn thin_svd( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<SvdTensorResult<T>, Error>
fn svdvals( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<Tensor<<T as LinalgScalar>::Real>, Error>
Sourcefn lu_factor_ex(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<LuTensorExResult<T>, Error>
fn lu_factor_ex( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorExResult<T>, Error>
fn lu_factor( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorResult<T>, Error>
Sourcefn lu_factor_no_pivot(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<LuTensorResult<T>, Error>
fn lu_factor_no_pivot( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<LuTensorResult<T>, Error>
Sourcefn cholesky_ex(
ctx: &mut Self::Context,
a: &Tensor<T>,
) -> Result<CholeskyTensorExResult<T>, Error>
fn cholesky_ex( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<CholeskyTensorExResult<T>, Error>
fn cholesky(ctx: &mut Self::Context, a: &Tensor<T>) -> Result<Tensor<T>, Error>
fn eigen_sym( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<EigenTensorResult<T>, Error>
fn eig( ctx: &mut Self::Context, a: &Tensor<T>, ) -> Result<EigTensorResult<T>, Error>
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.