Enum NDIterOpFlags
Per-operand flags during iteration. Matches NumPy's NPY_OP_ITFLAG_* constants.
[Flags]
public enum NDIterOpFlags : ushort
Fields
None = 0WRITE = 1Operand will be written to.
READ = 2Operand will be read from.
READWRITE = WRITE | READOperand is read-write.
CAST = 4Operand needs type conversion/byte swapping/alignment.
BUFNEVER = 8Operand never needs buffering.
BUF_SINGLESTRIDE = 16Buffer filling can use single stride.
REDUCE = 32Operand is being reduced.
VIRTUAL = 64Operand is virtual (no backing array).
WRITEMASKED = 128Operand requires masking when copying buffer to array.
BUF_REUSABLE = 256Buffer is fully filled and ready for reuse.
FORCECOPY = 512Operand must be copied.
HAS_WRITEBACK = 1024Operand has temporary data, write back at dealloc.
CONTIG = 2048User requested contiguous operand.
BUF_REDUCE = 4096The buffered double loop iterates this operand as a REDUCE operand: one of its two buffered strides is 0 — the inner one (its element repeats along the core, and the pointer steps per outer iteration) or the outer one (the core repeats per outer iteration) — and its buffer holds the core or the outer column only.
NumPy's
NPY_OP_ITFLAG_REDUCEasnpyiter_find_buffering_setupleaves it: set only under BUFREDUCE, and possibly on an operand that is not reduced at all (an unbuffered input whose strides make the reduce walk cheaper). REDUCE keeps the construction's meaning (the operand is written along a broadcast axis) for the iterator's public queries.