diff options
Diffstat (limited to 'pl/math/poly_advsimd_f32.h')
-rw-r--r-- | pl/math/poly_advsimd_f32.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pl/math/poly_advsimd_f32.h b/pl/math/poly_advsimd_f32.h new file mode 100644 index 000000000000..438e153dff90 --- /dev/null +++ b/pl/math/poly_advsimd_f32.h @@ -0,0 +1,24 @@ +/* + * Helpers for evaluating polynomials on single-precision AdvSIMD input, using + * various schemes. + * + * Copyright (c) 2023, Arm Limited. + * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception + */ + +#ifndef PL_MATH_POLY_ADVSIMD_F32_H +#define PL_MATH_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 |