summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-06-17 19:34:18 -0400
committerErik Schnetter <schnetter@gmail.com>2013-06-17 19:34:18 -0400
commita66c6ecfdd734ae511cbb2d76c282c4bf84f08a4 (patch)
treef5f43d7a07d2a5605c740fed7df0f6b1a28d88fc
parentf70776595e11233be1d8c1dca28e011ea33125aa (diff)
downloadvecmathlib-a66c6ecfdd734ae511cbb2d76c282c4bf84f08a4.zip
vecmathlib-a66c6ecfdd734ae511cbb2d76c282c4bf84f08a4.tar.gz
Do not use constructor forwarding
The Intel compiler does not support it.
-rw-r--r--vec_mask.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/vec_mask.h b/vec_mask.h
index 75e5db9..31538b0 100644
--- a/vec_mask.h
+++ b/vec_mask.h
@@ -43,8 +43,15 @@ namespace vecmathlib {
// Construct a mask for a loop starting at imin, aligned down
mask_t(std::ptrdiff_t imin_, std::ptrdiff_t imax_, std::ptrdiff_t ioff):
- mask_t(imin_ - (ioff + imin_) % size, imin_, imax_, ioff)
+ imin(imin_), imax(imax_), i(imin_ - (ioff + imin_) % size)
{
+ all_m = i-imin >= 0 && i+size-1-imax < 0;
+ if (__builtin_expect(all_m, true)) {
+ m = true;
+ } else {
+ m = (! signbit(intvec_t(i - imin) + intvec_t::iota()) &&
+ signbit(intvec_t(i + size-1 - imax) + intvec_t::iota()));
+ }
}
// Get current index
OpenPOWER on IntegriCloud