Tensor Layout.Linear Index To Offset 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.3
C#
The offset of the element with linear index linearIndex within shape.
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
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
Int32The offset of the element with linear index linearIndex within shape.