diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/umath/fast_loop_macros.h | 6 | ||||
-rw-r--r-- | numpy/core/src/umath/loops.c.src | 7 | ||||
-rw-r--r-- | numpy/core/src/umath/simd.inc.src | 6 |
3 files changed, 8 insertions, 11 deletions
diff --git a/numpy/core/src/umath/fast_loop_macros.h b/numpy/core/src/umath/fast_loop_macros.h index e6789e1d6..74bf01643 100644 --- a/numpy/core/src/umath/fast_loop_macros.h +++ b/numpy/core/src/umath/fast_loop_macros.h @@ -10,7 +10,11 @@ #ifndef _NPY_UMATH_FAST_LOOP_MACROS_H_ #define _NPY_UMATH_FAST_LOOP_MACROS_H_ -#include "simd.inc" +static NPY_INLINE npy_uintp +abs_ptrdiff(char *a, char *b) +{ + return (a > b) ? (a - b) : (b - a); +} /** * Simple unoptimized loop macros that iterate over the ufunc arguments in diff --git a/numpy/core/src/umath/loops.c.src b/numpy/core/src/umath/loops.c.src index eea82309c..a5c663a47 100644 --- a/numpy/core/src/umath/loops.c.src +++ b/numpy/core/src/umath/loops.c.src @@ -38,6 +38,9 @@ #define NPY_MAX_SIMD_SIZE 1024 #endif +/** Provides the various *_LOOP macros */ +#include "fast_loop_macros.h" + /* * include vectorized functions and dispatchers * this file is safe to include also for generic builds @@ -46,10 +49,6 @@ */ #include "simd.inc" -/** Provides the various *_LOOP macros */ -#include "fast_loop_macros.h" - - /****************************************************************************** ** GENERIC FLOAT LOOPS ** *****************************************************************************/ diff --git a/numpy/core/src/umath/simd.inc.src b/numpy/core/src/umath/simd.inc.src index 106c7e7c9..6b0bcc3dc 100644 --- a/numpy/core/src/umath/simd.inc.src +++ b/numpy/core/src/umath/simd.inc.src @@ -50,12 +50,6 @@ */ #define MAX_STEP_SIZE 2097152 -static NPY_INLINE npy_uintp -abs_ptrdiff(char *a, char *b) -{ - return (a > b) ? (a - b) : (b - a); -} - /* * nomemoverlap - returns true if two strided arrays have an overlapping * region in memory. ip_size/op_size = size of the arrays which can be negative |