Table of Contents

Enum NDIterPerOpFlags

Namespace
NumSharp.Backends.Iteration
Assembly
NumSharp.dll

Per-operand flags passed to iterator construction. Bit values match NumPy's NPY_ITER_* per-operand constants exactly (see numpy/_core/include/numpy/ndarraytypes.h). All values occupy the high 16 bits per NumPy's NPY_ITER_PER_OP_FLAGS mask (0xffff0000).

[Flags]
public enum NDIterPerOpFlags : uint
Extension Methods

Fields

None = 0
READWRITE = 65536

Operand is read-write. (NPY_ITER_READWRITE)

READONLY = 131072

Operand is read-only. (NPY_ITER_READONLY)

WRITEONLY = 262144

Operand is write-only. (NPY_ITER_WRITEONLY)

NBO = 524288

Require native byte order. (NPY_ITER_NBO)

ALIGNED = 1048576

Require aligned data. (NPY_ITER_ALIGNED)

CONTIG = 2097152

Require contiguous data. (NPY_ITER_CONTIG)

COPY = 4194304

Copy operand data. (NPY_ITER_COPY)

UPDATEIFCOPY = 8388608

Update original if copy is made. (NPY_ITER_UPDATEIFCOPY)

ALLOCATE = 16777216

Allocate output array if null. (NPY_ITER_ALLOCATE)

NO_SUBTYPE = 33554432

Don't allocate with subtype. (NPY_ITER_NO_SUBTYPE)

VIRTUAL = 67108864

Virtual operand slot (no backing array, temporary data only). (NPY_ITER_VIRTUAL)

NO_BROADCAST = 134217728

Don't broadcast this operand. (NPY_ITER_NO_BROADCAST)

WRITEMASKED = 268435456

Write only where mask is true. (NPY_ITER_WRITEMASKED)

ARRAYMASK = 536870912

This operand is an array mask. (NPY_ITER_ARRAYMASK)

OVERLAP_ASSUME_ELEMENTWISE_PER_OP = 1073741824

Assume iterator-order access for COPY_IF_OVERLAP. (NPY_ITER_OVERLAP_ASSUME_ELEMENTWISE)

When COPY_IF_OVERLAP is set and this operand has this flag, the overlap check can short-circuit: if both operands point to the same buffer with identical memory layout and no internal overlap, no copy is needed (because the caller's inner loop accesses data strictly element-by-element in iterator order). NumPy nditer_constr.c:3130-3137 (same-data overlap short-circuit).