Module layout

Module layout 

Source
Expand description

Layouts which describe the shape and strides of a tensor.

Structs§

DynLayout
Defines the valid indices for an N-dimensional array and how to map them to offsets in a linear buffer, where N can be varied at runtime.
NdLayout
Defines the valid indices for an N-dimensional array and how to map them to offsets in a linear buffer, where N is known at compile time.

Enums§

OverlapPolicy
Specifies whether a tensor or view may have an overlapping layout.

Traits§

AsIndex
Trait for converting types into indices for use with a given layout.
BroadcastLayout
Trait for broadcasting a layout from one shape to another.
IntoLayout
Trait for shapes which can be used to create a contiguous layout.
Layout
Describes the shape and strides of a tensor.
MatrixLayout
Provides convenience methods for querying the shape and strides of a matrix.
MutLayout
MutLayout extends Layout with methods for creating, modifying and transforming layouts.
RemoveDim
Trait that removes one dimension from a layout.
ResizeLayout
Trait which extends MutLayout with support for changing the number of dimensions in-place.
SliceWith
Trait for slicing a layout with a range.
TrustedLayout
A layout which upholds guarantees on returned storage offsets.

Functions§

is_valid_permutation
Return true if permutation is a valid permutation of dimensions for a tensor of rank ndim.