Table of Contents

Struct NDAxisState

Namespace
NumSharp.Backends.Iteration
Assembly
NumSharp.dll

Per-call axis-iteration state. The outer-dimension scratch (OuterShapePtr and the stride pointers) points at buffers the entry method stackallocs — non-pinned stack memory — so this is a ref struct: it MUST NOT escape the stack frame that owns those buffers. The ref-struct constraint enforces that at compile time (no boxing, no heap field, no closure/async capture), the way Span<T> and NDIterRef do — otherwise the raw pointers (which the compiler does not lifetime-track) could dangle.

public ref struct NDAxisState
Inherited Members

Fields

Axis

public int Axis

Field Value

int

AxisLength

public long AxisLength

Field Value

long

Data0

public nint Data0

Field Value

nint

Data1

public nint Data1

Field Value

nint

DestinationAxisStride

public long DestinationAxisStride

Field Value

long

DestinationOuterStridesPtr

public long* DestinationOuterStridesPtr

Field Value

long*

OuterNDim

public int OuterNDim

Field Value

int

OuterShapePtr

public long* OuterShapePtr

Field Value

long*

OuterSize

public long OuterSize

Field Value

long

SourceAxisStride

public long SourceAxisStride

Field Value

long

SourceOuterStridesPtr

public long* SourceOuterStridesPtr

Field Value

long*

Methods

GetDestinationOuterStridesPointer()

public long* GetDestinationOuterStridesPointer()

Returns

long*

GetOuterShapePointer()

public long* GetOuterShapePointer()

Returns

long*

GetSourceOuterStridesPointer()

public long* GetSourceOuterStridesPointer()

Returns

long*