summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2013-06-07 19:49:23 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2013-06-08 20:44:06 +0200
commit0defe6d1813e93d6b8813b6c82d8151972c26778 (patch)
tree2917f168c3b9e1e6ab5d1f6e46eaca63688dda41
parent564aa53e343e81de6864f43cb5f89932fdc1c718 (diff)
downloadnumpy-0defe6d1813e93d6b8813b6c82d8151972c26778.tar.gz
MAINT: use @vpre@ for simd sqrt intrinsic prefix
allows simple extension to AVX
-rw-r--r--numpy/core/src/umath/loops.c.src8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/umath/loops.c.src b/numpy/core/src/umath/loops.c.src
index cd87db082..f49f86cad 100644
--- a/numpy/core/src/umath/loops.c.src
+++ b/numpy/core/src/umath/loops.c.src
@@ -1320,14 +1320,14 @@ sse2_sqrt_@TYPE@(@type@ * op, const @type@ * ip, const npy_intp n)
assert(npy_is_aligned(&op[i], 16));
if (npy_is_aligned(&ip[i], 16)) {
UNARY_LOOP_BLOCKED(@type@, 16) {
- @vtype@ d = _mm_load_@vsuf@(&ip[i]);
- _mm_store_@vsuf@(&op[i], _mm_sqrt_@vsuf@(d));
+ @vtype@ d = @vpre@_load_@vsuf@(&ip[i]);
+ @vpre@_store_@vsuf@(&op[i], @vpre@_sqrt_@vsuf@(d));
}
}
else {
UNARY_LOOP_BLOCKED(@type@, 16) {
- @vtype@ d = _mm_loadu_@vsuf@(&ip[i]);
- _mm_store_@vsuf@(&op[i], _mm_sqrt_@vsuf@(d));
+ @vtype@ d = @vpre@_loadu_@vsuf@(&ip[i]);
+ @vpre@_store_@vsuf@(&op[i], @vpre@_sqrt_@vsuf@(d));
}
}
UNARY_LOOP_BLOCKED_END {