diff options
author | Raghuveer Devulapalli <raghuveer.devulapalli@intel.com> | 2020-02-21 11:42:22 -0800 |
---|---|---|
committer | Raghuveer Devulapalli <raghuveer.devulapalli@intel.com> | 2020-02-23 07:37:52 -0800 |
commit | 735fb999059d809007217b4e84321a63c63c8406 (patch) | |
tree | 07d2d756579f131ee81f0f0b30c074689938aef2 /numpy/core/src | |
parent | 085cdbe5e7755ed40684a1cb5b1f6de743fa7263 (diff) | |
download | numpy-735fb999059d809007217b4e84321a63c63c8406.tar.gz |
BUG: Update IS_OUTPUT_BLOCKABLE_UNARY to use the nomemoverlap check
abs_ptrdiff(args[1], args[0]) >= (vsize) does not accomodate strides,
specially when the strides are negative.
Diffstat (limited to 'numpy/core/src')
-rw-r--r-- | numpy/core/src/umath/simd.inc.src | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/src/umath/simd.inc.src b/numpy/core/src/umath/simd.inc.src index 61321445f..137fdaa71 100644 --- a/numpy/core/src/umath/simd.inc.src +++ b/numpy/core/src/umath/simd.inc.src @@ -129,8 +129,7 @@ nomemoverlap(char *ip, */ #define IS_OUTPUT_BLOCKABLE_UNARY(esize, vsize) \ (steps[1] == (esize) && abs(steps[0]) < MAX_STEP_SIZE && \ - ((abs_ptrdiff(args[1], args[0]) >= (vsize)) || \ - ((abs_ptrdiff(args[1], args[0]) == 0)))) + (nomemoverlap(args[1], steps[1]*dimensions[0], args[0], steps[0]*dimensions[0]))) #define IS_BLOCKABLE_REDUCE(esize, vsize) \ (steps[1] == (esize) && abs_ptrdiff(args[1], args[0]) >= (vsize) && \ |