Expand description
Tensor storage and linear algebra backend for tensor4all.
This crate provides:
Storage: Dynamic snapshot storage for logical tensor valuesStructuredStorage:axis_classes-aware materialized snapshotsAnyScalar: Dynamic scalar type backed by rank-0tenferro::Tensor- tenferro-backed execution helpers for tensor algebra
§Feature Flags
backend-tenferro(default): Use tenferro backend for linalg/einsum
Structs§
- Allocator
Pressure Relief - Result reported by
release_process_allocator_cached_memory. - Full
PivLu Matrix Result - Result of complete-pivoting LU decomposition on
Matrixvalues. - Full
PivLu Result - Result of complete-pivoting LU decomposition
P A Q^T = L U. - Matrix
- A dense 2D matrix in column-major layout.
- Storage
- Storage backend for tensor data.
- Structured
Storage - Structured tensor snapshot storage.
- SvdResult
- Result of SVD decomposition
A = U * diag(S) * Vt.
Enums§
- Native
Tensor Read Input - Read-only native tensor input that can either borrow external payload data or own a temporary materialized tensor.
- Storage
Error - Errors returned by storage payload and elementwise operations.
- Storage
Kind - Classifies the compact layout used by
Storage.
Traits§
- Backend
Linalg Scalar - Scalar bound accepted by tensor4all’s typed linalg wrappers.
- BlasMul
- BLAS-backed matrix multiplication dispatch.
- Matrix
Scalar - Scalar bound for dense backend matrix utilities.
- Matrix
Solve Scalar - Scalar types supported by
solve_matrix. - Storage
Scalar - Trait for scalar types that can be stored in
Storage. - SumFrom
Storage - Types that can be computed as the result of a reduction over
Storage. - Tensor
Element - Public scalar element types supported by tensor4all dense/diag constructors.
Functions§
- axpby_
native_ tensor - Compute
a * lhs + b * rhs. - axpby_
storage_ native - Compute
a * lhs + b * rhsover storages via native tensors. - conj_
native_ tensor - Conjugate a native tensor.
- contract_
native_ tensor - Contract two native tensors along matching axes.
- contract_
storage - Contract two storage tensors along specified axes.
- contract_
storage_ native - Contract storages via native tensors.
- default_
eager_ ctx - Return the process-global eager context used for reverse-mode AD.
- dense_
native_ tensor_ from_ col_ major - Build a dense native tensor from column-major data.
- diag_
native_ tensor_ from_ col_ major - Build a dense native tensor whose logical values are diagonal.
- einsum_
native_ tensor_ reads - Execute a cached einsum over read-only native tensor inputs.
- einsum_
native_ tensors - Execute a cached einsum over borrowed native tensors.
- einsum_
native_ tensors_ owned - Execute a cached einsum over owned native tensors.
- from_
vec2d - Create a matrix from a 2D vector.
- full_
piv_ lu_ backend - Compute complete-pivoting LU with the configured tenferro backend.
- full_
piv_ lu_ matrix - Compute complete-pivoting LU for a column-major
Matrix. - make_
mut_ storage - Helper to get a mutable reference to storage, cloning if needed (COW).
- mat_mul
- Matrix multiplication: A * B.
- mindim
- Get the minimum dimension from a slice of dimensions.
- native_
tensor_ primal_ to_ dense_ c64_ col_ major - Materialize dense Complex64 values from a native tensor.
- native_
tensor_ primal_ to_ dense_ col_ major - Materialize dense column-major values from a native tensor.
- native_
tensor_ primal_ to_ dense_ f64_ col_ major - Materialize dense f64 values from a native tensor.
- native_
tensor_ primal_ to_ diag_ c64 - Extract the diagonal payload from a complex native tensor.
- native_
tensor_ primal_ to_ diag_ f64 - Extract the diagonal payload from a real native tensor.
- native_
tensor_ primal_ to_ storage - Materialize a native tensor into dense storage.
- outer_
product_ native_ tensor - Compute the outer product of two native tensors.
- outer_
product_ storage_ native - Outer-product storages via native tensors.
- permute_
native_ tensor - Permute axes of a native tensor.
- permute_
storage_ native - Permute storage by round-tripping through native tensors.
- print_
and_ reset_ native_ einsum_ profile - Print and clear the aggregated native einsum profile.
- qr_
backend - Compute a thin/economy QR decomposition on a typed tensor.
- qr_
native_ tensor - Compute a QR decomposition on a native tensor.
- release_
process_ allocator_ cached_ memory - Ask the process allocator to return cached/free memory to the operating system.
- reset_
native_ einsum_ profile - Reset the aggregated native einsum profile.
- reshape_
col_ major_ native_ tensor - Reshape a native tensor without changing its column-major linearization.
- scale_
native_ tensor - Multiply a native tensor by a dynamic scalar.
- scale_
storage_ native - Scale storage by a scalar via native tensors.
- solve_
backend - Solve
A X = Bwith the configured tenferro backend. - solve_
matrix - Solve
A X = Bfor column-majorMatrixvalues. - storage_
payload_ native_ read_ input - Build a read-only native tensor input over the compact storage payload.
- storage_
to_ native_ tensor - Convert storage to a dense native tensor.
- submatrix
- Get a submatrix by selecting specific rows and columns.
- submatrix_
argmax - Find the position and value of the maximum absolute value in a submatrix.
- sum_
native_ tensor - Sum all elements of a native tensor, returning a dynamic scalar.
- svd_
backend - Compute a thin/economy SVD on a typed tensor.
- svd_
native_ tensor - Compute an SVD on a native tensor.
- swap_
cols - Swap two columns in a matrix in-place.
- swap_
rows - Swap two rows in a matrix in-place.
- tangent_
native_ tensor - Return the tangent tensor when present.
- transpose
- Transpose the matrix.
- with_
default_ backend - Run a closure against the process-global CPU backend.
Type Aliases§
- AnyScalar
- Backward-compatible scalar type name used across tensor4all APIs.
- Storage
Result - Result type returned by storage methods that can fail with
StorageError.