Skip to main content

Crate tenferro_tensor_core

Crate tenferro_tensor_core 

Source
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.
MemberSpec
Promotion-relevant facts about one set member.
Rank
Static tensor rank marker.
SliceSpec
Explicit slice descriptor.
TensorLayout
Storage-neutral tensor layout metadata.

Enums§

AdAdmissionError
Why a scalar may not be differentiated at the requested order.
DType
Runtime scalar dtype tag.
ErrorKind
Coarse classification shared by crate-local error types.
MemberKind
Kind of arithmetic a set member belongs to.
ScalarDomain
Algebra that a scalar’s ordinary arithmetic belongs to.
ShapeMismatch
Structured facts describing why two tensor shapes are incompatible.
ValidationError
Structured validation failures owned by the tensor data model.
ValidationKind
Coarse classification for shared tensor validation failures.

Traits§

IntoRankShape
Convert a shape container into the representation required by a tensor rank.
IntoShapeVec
Convert a common shape container into the dynamic owned shape type.
Scalar
A scalar the host tensor data model can store and move.
ScalarArithmetic
Arithmetic a scalar supports under its own rules.
TensorRank
Rank contract for tensor metadata shapes and strides.
TensorScalar
Sealed trait for scalar types supported by the core tensor data model.

Functions§

ad_admission
Answer whether the shared differentiation paths may differentiate T at order.
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.

Type Aliases§

Result
Result type for tensor data-model operations.
ShapeVec
Small tensor shape vector with inline capacity for common dynamic ranks.
StrideVec
Small tensor stride vector with signed element strides.