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/add_newdocs.py | |
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/add_newdocs.py')
-rw-r--r-- | numpy/add_newdocs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 1d4bf4511..b7b000376 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -169,6 +169,11 @@ add_newdoc('numpy.core', 'nditer', with one per iteration dimension, to be tracked. * "common_dtype" causes all the operands to be converted to a common data type, with copying or buffering as necessary. + * "copy_if_overlap" causes the iterator to determine if read + operands have overlap with write operands (except if + the arrays are exactly the same), and make temporary copies + as necessary to avoid overlap. False positives (needless + copying) are possible in some cases. * "delay_bufalloc" delays allocation of the buffers until a reset() call is made. Allows "allocate" operands to be initialized before their values are copied into the buffers. |