summaryrefslogtreecommitdiffstats
path: root/vec_sse_float4.h
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-07-05 15:29:45 -0400
committerErik Schnetter <schnetter@gmail.com>2013-07-05 15:29:45 -0400
commit95774ee7db1c9d6ac982e42f9971a3aee74b4380 (patch)
tree970b380e11bc3eacb4171fd80cf739e418f16b9e /vec_sse_float4.h
parent24b739381a4f6dc6f36a22cb1899e4fbf1aa0f5e (diff)
downloadvecmathlib-95774ee7db1c9d6ac982e42f9971a3aee74b4380.zip
vecmathlib-95774ee7db1c9d6ac982e42f9971a3aee74b4380.tar.gz
Improve all() and any() implementations
Diffstat (limited to 'vec_sse_float4.h')
-rw-r--r--vec_sse_float4.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/vec_sse_float4.h b/vec_sse_float4.h
index dc3ecb6..b514146 100644
--- a/vec_sse_float4.h
+++ b/vec_sse_float4.h
@@ -117,8 +117,7 @@ namespace vecmathlib {
#else
boolvec x = *this;
x = x && _mm_shuffle_ps(x.v, x.v, _MM_SHUFFLE(1,0,3,2));
- x = x && _mm_shuffle_ps(x.v, x.v, _MM_SHUFFLE(2,3,0,1));
- return x[0];
+ return x[0] && x[2];
#endif
}
bool any() const
@@ -129,8 +128,7 @@ namespace vecmathlib {
#else
boolvec x = *this;
x = x || _mm_shuffle_ps(x.v, x.v, _MM_SHUFFLE(1,0,3,2));
- x = x || _mm_shuffle_ps(x.v, x.v, _MM_SHUFFLE(2,3,0,1));
- return x[0];
+ return x[0] || x[2];
#endif
}
OpenPOWER on IntegriCloud