aboutsummaryrefslogtreecommitdiff
path: root/math/v_math.h
diff options
context:
space:
mode:
Diffstat (limited to 'math/v_math.h')
-rw-r--r--math/v_math.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/math/v_math.h b/math/v_math.h
index 0861e98..3db22e5 100644
--- a/math/v_math.h
+++ b/math/v_math.h
@@ -249,6 +249,11 @@ v_call2_f32 (f32_t (*f) (f32_t, f32_t), v_f32_t x1, v_f32_t x2, v_f32_t y,
return f (x1, x2);
}
+static inline int
+v_lanes64 (void)
+{
+ return 1;
+}
static inline v_f64_t
v_f64 (f64_t x)
{
@@ -264,6 +269,16 @@ v_s64 (s64_t x)
{
return x;
}
+static inline f64_t
+v_get_f64 (v_f64_t x, int i)
+{
+ return x;
+}
+static inline void
+v_set_f64 (v_f64_t *x, int i, f64_t v)
+{
+ *x = v;
+}
/* true if any elements of a v_cond result is non-zero. */
static inline int
v_any_u64 (v_u64_t x)
@@ -506,6 +521,11 @@ v_call2_f32 (f32_t (*f) (f32_t, f32_t), v_f32_t x1, v_f32_t x2, v_f32_t y,
p[2] ? f (x1[2], x2[2]) : y[2], p[3] ? f (x1[3], x2[3]) : y[3]};
}
+static inline int
+v_lanes64 (void)
+{
+ return 2;
+}
static inline v_f64_t
v_f64 (f64_t x)
{
@@ -521,6 +541,16 @@ v_s64 (s64_t x)
{
return (v_s64_t){x, x};
}
+static inline f64_t
+v_get_f64 (v_f64_t x, int i)
+{
+ return x[i];
+}
+static inline void
+v_set_f64 (v_f64_t *x, int i, f64_t v)
+{
+ (*x)[i] = v;
+}
/* true if any elements of a v_cond result is non-zero. */
static inline int
v_any_u64 (v_u64_t x)