Tensor
Types
F32
32-bit float
F64
64-bit float
I32
32-bit signed integer
I64
64-bit signed integer
U32
32-bit unsigned integer
U64
64-bit unsigned integer
Bool
Boolean
Shape is a list of dimension sizes.
Strides in bytes for each dimension.
Functions
Create a tensor filled with zeros.
Create a tensor filled with ones.
Create a tensor from a list.
Create a tensor from an unboxed array.
Generate a tensor using a function.
Get the shape of a tensor.
Get the rank (number of dimensions).
Get the total number of elements.
Get the element type.
Get the strides.
Check if the tensor is contiguous in memory.
Reshape a tensor (view, no copy if possible).
Slice a tensor (view, no copy).
Transpose a tensor (view, no copy).
Create a view with explicit shape and strides.
Map a function over tensor elements.
Zip two tensors with a function.
Zip three tensors with a function.
Sum all elements.
Product of all elements.
Mean of all elements.
Maximum element.
Minimum element.
Index of maximum element.
Index of minimum element.
Fold over tensor elements.
Strict left fold.
Dot product of two 1D tensors.
Matrix multiplication.
Outer product of two 1D tensors.
Trace of a matrix.
Diagonal of a matrix.
Parallel map.
Parallel reduction.
Parallel for loop.
Force materialization (no fusion).
Force evaluation of tensor elements.