diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-05-19 17:44:13 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-05-25 17:36:00 +0200 |
commit | fe69102dd34619ce18cf074ef0e6e46611bc17e7 (patch) | |
tree | 1c6119170ab59068e7535e4882ac5cd36e54a6be | |
parent | 0adccaaa910ab495e993f453956fd983775604f3 (diff) | |
download | numpy-fe69102dd34619ce18cf074ef0e6e46611bc17e7.tar.gz |
MAINT: use sse header macros for einsum sse activation
-rw-r--r-- | numpy/core/setup_common.py | 5 | ||||
-rw-r--r-- | numpy/core/src/multiarray/einsum.c.src | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index 847c4a624..284acfe21 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -98,7 +98,10 @@ OPTIONAL_STDFUNCS = ["expm1", "log1p", "acosh", "asinh", "atanh", "copysign", "nextafter"] -OPTIONAL_HEADERS = ["emmintrin.h" # SSE2, amd64 only +OPTIONAL_HEADERS = [ +# sse headers only enabled automatically on amd64/x32 builds + "xmmintrin.h", # SSE + "emmintrin.h", # SSE2 ] # optional gcc compiler builtins and their call arguments diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src index 2c59533f8..56b1ce746 100644 --- a/numpy/core/src/multiarray/einsum.c.src +++ b/numpy/core/src/multiarray/einsum.c.src @@ -17,12 +17,13 @@ #include <numpy/arrayobject.h> #include <numpy/halffloat.h> #include <npy_pycompat.h> +#include <npy_config.h> #include <ctype.h> #include "convert.h" -#ifdef __SSE__ +#ifdef HAVE_XMMINTRIN_H #define EINSUM_USE_SSE1 1 #else #define EINSUM_USE_SSE1 0 @@ -31,7 +32,7 @@ /* * TODO: Only some SSE2 for float64 is implemented. */ -#ifdef __SSE2__ +#ifdef HAVE_EMMINTRIN_H #define EINSUM_USE_SSE2 1 #else #define EINSUM_USE_SSE2 0 |