[][src]Module math::tensor

Structs

EphemeralView

A View of the Underlying Referenced Data as a Particular Shape

Tensor

An N-dimensional Tensor

TensorShape

The shape of an N-dimensional tensor has a size for each dimension, with an associated stride, e.g., a row-major 3 x 5 matrix will have a stride of 5 for the dimension of size 3 and a stride of 1 for the dimension of size 5, and the resulting dims_strides is [(3, 5), (5, 1)]. Index 0 of dims_strides always refers to the leftmost dimension.

Traits

IntoTensor

The implementer can be converted into a Tensor struct with the specified shape.

ShapableData

The implementer provides an interface for the underlying data and shape.

ToView

The implementer can be viewed as a tensor of shape through the as_shape method. The resulting EphemeralView cannot outlive the original data struct.

Type Definitions

Length
Stride