From bc7cc9d2a762a26b2fcbf150b3fc9c6993ffa16c Mon Sep 17 00:00:00 2001 From: Joe Ramsay Date: Fri, 9 Dec 2022 12:19:38 +0000 Subject: pl/math: Add polynomial helpers Add macros for simplifying polynomial evaluation using either Horner, pairwise Horner or Estrin. Several routines have been modified to use the new helpers. Readability is improved slightly, and we expect that this will make prototyping new routines simpler. --- pl/math/estrinf.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pl/math/estrinf.h (limited to 'pl/math/estrinf.h') diff --git a/pl/math/estrinf.h b/pl/math/estrinf.h new file mode 100644 index 0000000..be52ab5 --- /dev/null +++ b/pl/math/estrinf.h @@ -0,0 +1,14 @@ +/* + * Helper macros for single-precision Estrin polynomial evaluation. + * + * Copyright (c) 2022, Arm Limited. + * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception + */ + +#if V_SUPPORTED +#define FMA v_fma_f32 +#else +#define FMA fmaf +#endif + +#include "estrin_wrap.h" -- cgit v1.2.3 From f0f80b8a19b2593491847ed87456694d789f6f80 Mon Sep 17 00:00:00 2001 From: Joe Ramsay Date: Fri, 6 Jan 2023 09:10:57 +0000 Subject: pl/math: Update copyright years All files in pl/math updated to 2023. --- pl/math/estrinf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pl/math/estrinf.h') diff --git a/pl/math/estrinf.h b/pl/math/estrinf.h index be52ab5..175233c 100644 --- a/pl/math/estrinf.h +++ b/pl/math/estrinf.h @@ -1,7 +1,7 @@ /* * Helper macros for single-precision Estrin polynomial evaluation. * - * Copyright (c) 2022, Arm Limited. + * Copyright (c) 2022-2023, Arm Limited. * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception */ -- cgit v1.2.3