aboutsummaryrefslogtreecommitdiff
path: root/math/poly_scalar_f32.h
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2025-01-10 10:34:52 +0000
committerAndrew Turner <andrew@FreeBSD.org>2025-01-10 10:39:34 +0000
commit9d1de25930735261c16ed874a933b4c1f1d9041e (patch)
treeb0cac1c933cc1ecb885c7e757b89ffbf13f1f012 /math/poly_scalar_f32.h
parentedc5c0de794f521eb620d2b6cbaee2434442a8f3 (diff)
Diffstat (limited to 'math/poly_scalar_f32.h')
-rw-r--r--math/poly_scalar_f32.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/math/poly_scalar_f32.h b/math/poly_scalar_f32.h
new file mode 100644
index 000000000000..198e5801938a
--- /dev/null
+++ b/math/poly_scalar_f32.h
@@ -0,0 +1,24 @@
+/*
+ * Helpers for evaluating polynomials on siongle-precision scalar input, using
+ * various schemes.
+ *
+ * Copyright (c) 2023-2024, Arm Limited.
+ * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
+ */
+
+#ifndef MATH_POLY_SCALAR_F32_H
+#define MATH_POLY_SCALAR_F32_H
+
+#include <math.h>
+
+/* Wrap scalar f32 helpers: evaluation of some scheme/order has form:
+ [scheme]_[order]_f32. */
+#define VTYPE float
+#define FMA fmaf
+#define VWRAP(f) f##_f32
+#include "poly_generic.h"
+#undef VWRAP
+#undef FMA
+#undef VTYPE
+
+#endif