TensorLayout.LinearIndexToOffset Method

Converts the linear index in the specified shape to an offset.

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0
C#
public int LinearIndexToOffset(
	TensorShape shape,
	int linearIndex
)

Parameters

shape  TensorShape
The tensor shape of the linear index.
linearIndex  Int32
A linear index into shape.

Return Value

Int32
The offset of the element with linear index linearIndex within shape.

See Also