about summary refs log tree commit diff
path: root/sysdeps/aarch64/fpu/poly_advsimd_f32.h
diff options
context:
space:
mode:
authorJoe Ramsay <Joe.Ramsay@arm.com>2023-10-05 17:10:48 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2023-10-23 15:00:44 +0100
commitf554334c05a95c6b4df532ddc88cd3e72dc7d04c (patch)
tree1ee426aaf6fbc68b5e7cb27286c8396738df9bc4 /sysdeps/aarch64/fpu/poly_advsimd_f32.h
parent2aa0974d2573441bffd596b07bff8698b1f2f18c (diff)
downloadglibc-f554334c05a95c6b4df532ddc88cd3e72dc7d04c.tar.gz
glibc-f554334c05a95c6b4df532ddc88cd3e72dc7d04c.tar.xz
glibc-f554334c05a95c6b4df532ddc88cd3e72dc7d04c.zip
aarch64: Add vector implementations of tan routines
This includes some utility headers for evaluating polynomials using
various schemes.
Diffstat (limited to 'sysdeps/aarch64/fpu/poly_advsimd_f32.h')
-rw-r--r--sysdeps/aarch64/fpu/poly_advsimd_f32.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/sysdeps/aarch64/fpu/poly_advsimd_f32.h b/sysdeps/aarch64/fpu/poly_advsimd_f32.h
new file mode 100644
index 0000000000..9e2ad9ad94
--- /dev/null
+++ b/sysdeps/aarch64/fpu/poly_advsimd_f32.h
@@ -0,0 +1,36 @@
+/* Helpers for evaluating polynomials on single-precision AdvSIMD input, using
+   various schemes.
+
+   Copyright (C) 2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef AARCH64_FPU_POLY_ADVSIMD_F32_H
+#define AARCH64_FPU_POLY_ADVSIMD_F32_H
+
+#include <arm_neon.h>
+
+/* Wrap AdvSIMD f32 helpers: evaluation of some scheme/order has form:
+   v_[scheme]_[order]_f32.  */
+#define VTYPE float32x4_t
+#define FMA(x, y, z) vfmaq_f32 (z, x, y)
+#define VWRAP(f) v_##f##_f32
+#include "poly_generic.h"
+#undef VWRAP
+#undef FMA
+#undef VTYPE
+
+#endif