summaryrefslogtreecommitdiffstats
path: root/vec_neon_float2.h
diff options
context:
space:
mode:
Diffstat (limited to 'vec_neon_float2.h')
-rw-r--r--vec_neon_float2.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/vec_neon_float2.h b/vec_neon_float2.h
index 92a5074..970de54 100644
--- a/vec_neon_float2.h
+++ b/vec_neon_float2.h
@@ -111,6 +111,7 @@ namespace vecmathlib {
// ifthen(condition, then-value, else-value)
+ boolvec_t ifthen(boolvec_t x, boolvec_t y) const;
intvec_t ifthen(intvec_t x, intvec_t y) const; // defined after intvec
realvec_t ifthen(realvec_t x, realvec_t y) const; // defined after realvec
};
@@ -553,15 +554,18 @@ namespace vecmathlib {
}
inline
- boolvec<float,2>::intvec_t boolvec<float,2>::ifthen(intvec_t x, intvec_t y)
- const
+ boolvec<float,2> boolvec<float,2>::ifthen(boolvec_t x, boolvec_t y) const
+ {
+ return vbsl_u32(v, x.v, y.v);
+ }
+
+ inline intvec<float,2> boolvec<float,2>::ifthen(intvec_t x, intvec_t y) const
{
return vbsl_s32(v, x.v, y.v);
}
inline
- boolvec<float,2>::realvec_t boolvec<float,2>::ifthen(realvec_t x, realvec_t y)
- const
+ realvec<float,2> boolvec<float,2>::ifthen(realvec_t x, realvec_t y) const
{
return vbsl_f32(v, x.v, y.v);
}
OpenPOWER on IntegriCloud