Crate tensor_optim

Crate tensor_optim 

Source
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.
  • 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.
  • 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.

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§

ConstTensorOps
Operations only statically sized, non-allocating tensors can leverage.
TensorOps
Operations even the simplest tensors need to get indexing, shape, and other content.