TensorLayout Methods

Methods

CStyle Returns a contiguous C-style layout for the specified shape.
Equals(Object)Indicates whether this instance and a specified object are equal.
(Overrides ValueType.Equals(Object))
Equals(TensorLayout) Compares this layout to another layout.
EqualsExcept Compares this layout to another layout, ignoring the specified axes.
FortranStyle Returns a contiguous Fortran-style layout for the specified shape.
FromStrides Returns a tensor layout that uses the specified strides.
GetHashCodeReturns the hash code for this instance.
(Overrides ValueType.GetHashCode())
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsContiguousFor Gets whether this layout is contiguous for a tensor with the specified shape.
LinearIndexToOffset Converts the linear index in the specified shape to an offset.
SwapAxes Returns a new layout that has the strides along the specified axes swapped.
ToIndices Converts a linear index to a set of indexes for each dimension according to the layout.
ToOffset(Int32) Converts a set of two integer indexes to a linear offset.
ToOffset(Int32[]) Converts a set of integer indexes to a linear offset.
ToOffset(ReadOnlySpan<Int32>) Converts a set of integer indexes to a linear offset.
ToOffset(Int32, Int32) Converts a set of two integer indexes to a linear offset.
ToOffset(Int32, Int32, Int32) Converts a set of three integer indexes to a linear offset.
ToOffset(Int32, Int32, Int32, Int32) Converts a set of four integer indexes to a linear offset.
ToStringReturns the fully qualified type name of this instance.
(Inherited from ValueType)

See Also