diff options
author | Pauli Virtanen <pav@iki.fi> | 2016-09-05 20:41:56 +0200 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2017-01-19 22:12:47 +0100 |
commit | c5176ed63306d4abceca7d76d6a3ef063ed5a6b2 (patch) | |
tree | 6d98dc4ed502fc6423a34acc0b622d46a6ec9400 /numpy/core/include | |
parent | f4a5e5f45a0f779f0d216ef99150cb2042013221 (diff) | |
download | numpy-c5176ed63306d4abceca7d76d6a3ef063ed5a6b2.tar.gz |
ENH: NpyIter: add a flag to handle read/write operand overlap
Add a new NPY_ITER_COPY_IF_OVERLAP iterator flag to NpyIter, which
instructs it to check if read operands overlap with write operands in
memory, and make temporary copies to eliminate detected overlap.
Thanks to Sebastian Berg.
Diffstat (limited to 'numpy/core/include')
-rw-r--r-- | numpy/core/include/numpy/ndarraytypes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h index a9848f434..06d351a6a 100644 --- a/numpy/core/include/numpy/ndarraytypes.h +++ b/numpy/core/include/numpy/ndarraytypes.h @@ -1008,6 +1008,12 @@ typedef void (NpyIter_GetMultiIndexFunc)(NpyIter *iter, #define NPY_ITER_DELAY_BUFALLOC 0x00000800 /* When NPY_KEEPORDER is specified, disable reversing negative-stride axes */ #define NPY_ITER_DONT_NEGATE_STRIDES 0x00001000 +/* + * If output operands overlap with other operands (based on heuristics that + * has false positives but no false negatives), make temporary copies to + * eliminate overlap. + */ +#define NPY_ITER_COPY_IF_OVERLAP 0x00002000 /*** Per-operand flags that may be passed to the iterator constructors ***/ |