Expand description
This library offers basic tensor types:
RefTensor
: Statically sized slices with a mutable reference for data.- Ownership: The tensor does not own it’s data, it has references for the lifetime
'a
to each slice. - Allocation: This tensor has no dynamic allocation, it doesn’t have it’s own memory, just pointers.
- Ownership: The tensor does not own it’s data, it has references for the lifetime
ArrTensor
: Statically sized arrays build the foundation for shape and data memory.- Ownership: The entire tensor is owned by the
struct
. - Allocation: This tensor has no dynamic allocation, it lives on the stack.
- Ownership: The entire tensor is owned by the
DynTensor
: A dynamically allocated tensor with far more flexibility than the others.- Ownership: The entire tensor is owned by the
struct
. - Allocation: This tensor dynamically allocates everything, shape is boxed and data is wrapped in
Arc
.
- Ownership: The entire tensor is owned by the
Note: The crate is fully documented, no-std
compatible, and well tested.
It doesn’t even need alloc
unless the alloc
feature (off by default) is enabled.
Structs§
- ArrTensor
- A tensor made up of statically sized arrays.
- RefTensor
- A tensor-like structure that owns no data and holds only slices.
Constants§
- MAX_
STATIC_ RANK - A small limit to ranks mostly in
ArrTensor
. Primarily for matrix multiplication.
Traits§
- Const
Tensor Ops - Operations only statically sized, non-allocating tensors can leverage.
- Tensor
Ops - Operations even the simplest tensors need to get indexing, shape, and other content.