Expand description
Backend-independent rank/layout, dtype and scalar metadata.
tenferro-tensor-core owns backend-independent tensor metadata: scalar
tags and promotion facts, rank/layout metadata, and layout validation. It
does not own tensor storage, execution backends, backend buffers, GPU
handles, provider selection, or materializing kernels. The tensor families
that carry storage live in tenferro-tensor.
§Examples
use tenferro_tensor_core::{DType, Rank, TensorLayout};
let layout = TensorLayout::<Rank<2>>::compact([2, 3])?;
let transposed = layout.transpose_view([1, 0])?;
assert_eq!(transposed.shape(), &[3, 2]);
assert_eq!(DType::F64.spec().width, 64);Macros§
- define_
scalar_ tag - Define a closed scalar set’s tag type and its promotion facts.
Structs§
- DynRank
- Dynamic tensor rank marker.
- Member
Spec - Promotion-relevant facts about one set member.
- Rank
- Static tensor rank marker.
- Slice
Spec - Explicit slice descriptor.
- Tensor
Layout - Storage-neutral tensor layout metadata.
Enums§
- AdAdmission
Error - Why a scalar may not be differentiated at the requested order.
- DType
- Runtime scalar dtype tag.
- Error
Kind - Coarse classification shared by crate-local error types.
- Member
Kind - Kind of arithmetic a set member belongs to.
- Scalar
Domain - Algebra that a scalar’s ordinary arithmetic belongs to.
- Shape
Mismatch - Structured facts describing why two tensor shapes are incompatible.
- Validation
Error - Structured validation failures owned by the tensor data model.
- Validation
Kind - Coarse classification for shared tensor validation failures.
Traits§
- Into
Rank Shape - Convert a shape container into the representation required by a tensor rank.
- Into
Shape Vec - Convert a common shape container into the dynamic owned shape type.
- Scalar
- A scalar the host tensor data model can store and move.
- Scalar
Arithmetic - Arithmetic a scalar supports under its own rules.
- Tensor
Rank - Rank contract for tensor metadata shapes and strides.
- Tensor
Scalar - Sealed trait for scalar types supported by the core tensor data model.
Functions§
- ad_
admission - Answer whether the shared differentiation paths may differentiate
Tatorder. - col_
major_ strides - Return compact column-major strides for a shape.
- promote_
in_ set - Promote two members of one set from its parallel tag and fact tables.
- promote_
specs - Combine two member facts under the ordinary numeric promotion rules.