summaryrefslogtreecommitdiff
path: root/numpy/core/include
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-02-16 15:41:27 -0700
committerGitHub <noreply@github.com>2017-02-16 15:41:27 -0700
commitd55f40b1e48d5a5fbed80e00a140c9db6e19732f (patch)
tree733aa0ac1abdcc1aadf6452be5729b7b83095a09 /numpy/core/include
parentba1ddc421eac7b5c3accb99a4c633490a1814838 (diff)
parent8e8ce442e8449916a93951093cdce16cec006bcc (diff)
downloadnumpy-d55f40b1e48d5a5fbed80e00a140c9db6e19732f.tar.gz
Merge pull request #8043 from pv/ufunc-copy-overlap
ENH: umath: ensure ufuncs are well-defined with memory overlapping inputs
Diffstat (limited to 'numpy/core/include')
-rw-r--r--numpy/core/include/numpy/ndarraytypes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h
index a9848f434..7f6fe6524 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 ***/
@@ -1039,6 +1045,8 @@ typedef void (NpyIter_GetMultiIndexFunc)(NpyIter *iter,
#define NPY_ITER_WRITEMASKED 0x10000000
/* This array is the mask for all WRITEMASKED operands */
#define NPY_ITER_ARRAYMASK 0x20000000
+/* Assume iterator order data access for COPY_IF_OVERLAP */
+#define NPY_ITER_OVERLAP_ASSUME_ELEMENTWISE 0x40000000
#define NPY_ITER_GLOBAL_FLAGS 0x0000ffff
#define NPY_ITER_PER_OP_FLAGS 0xffff0000