diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 00:57:30 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 00:57:30 +0000 |
commit | 0edd6499aaed16bf45de92bb0ad1c729486ce6f4 (patch) | |
tree | b6182e391304fb3a42c51d482dcf671f540f2363 /pl/math/pl_sig.h | |
parent | f2e7d2de0fe4c2bddb59992ba401391f38627a1e (diff) | |
parent | 172d24a7ae67ee7bae413d5a8618f1b5edc002be (diff) | |
download | arm-optimized-routines-0edd6499aaed16bf45de92bb0ad1c729486ce6f4.tar.gz |
Snap for 10447354 from 172d24a7ae67ee7bae413d5a8618f1b5edc002be to mainline-cellbroadcast-releaseaml_cbr_341710000aml_cbr_341610000aml_cbr_341510010aml_cbr_341410010aml_cbr_341311010aml_cbr_341110000aml_cbr_341011000aml_cbr_340914000android14-mainline-cellbroadcast-release
Change-Id: I8753ae14d61308952964b5f87c7e48044f60727c
Diffstat (limited to 'pl/math/pl_sig.h')
-rw-r--r-- | pl/math/pl_sig.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pl/math/pl_sig.h b/pl/math/pl_sig.h new file mode 100644 index 0000000..686d24f --- /dev/null +++ b/pl/math/pl_sig.h @@ -0,0 +1,43 @@ +/* + * PL macros for emitting various ulp/bench entries based on function signature + * + * Copyright (c) 2022-2023, Arm Limited. + * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception. + */ +#define PL_DECL_SF1(fun) float fun##f (float); +#define PL_DECL_SF2(fun) float fun##f (float, float); +#define PL_DECL_SD1(fun) double fun (double); +#define PL_DECL_SD2(fun) double fun (double, double); + +#if V_SUPPORTED +#define PL_DECL_VF1(fun) VPCS_ATTR v_f32_t V_NAME (fun##f) (v_f32_t); +#define PL_DECL_VF2(fun) VPCS_ATTR v_f32_t V_NAME (fun##f) (v_f32_t, v_f32_t); +#define PL_DECL_VD1(fun) VPCS_ATTR v_f64_t V_NAME (fun) (v_f64_t); +#define PL_DECL_VD2(fun) VPCS_ATTR v_f64_t V_NAME (fun) (v_f64_t, v_f64_t); +#else +#define PL_DECL_VF1(fun) +#define PL_DECL_VF2(fun) +#define PL_DECL_VD1(fun) +#define PL_DECL_VD2(fun) +#endif + +#if SV_SUPPORTED +#define PL_DECL_SVF1(fun) sv_f32_t __sv_##fun##f_x (sv_f32_t, svbool_t); +#define PL_DECL_SVF2(fun) \ + sv_f32_t __sv_##fun##f_x (sv_f32_t, sv_f32_t, svbool_t); +#define PL_DECL_SVD1(fun) sv_f64_t __sv_##fun##_x (sv_f64_t, svbool_t); +#define PL_DECL_SVD2(fun) \ + sv_f64_t __sv_##fun##_x (sv_f64_t, sv_f64_t, svbool_t); +#else +#define PL_DECL_SVF1(fun) +#define PL_DECL_SVF2(fun) +#define PL_DECL_SVD1(fun) +#define PL_DECL_SVD2(fun) +#endif + +/* For building the routines, emit function prototype from PL_SIG. This + ensures that the correct signature has been chosen (wrong one will be a + compile error). PL_SIG is defined differently by various components of the + build system to emit entries in the wrappers and entries for mathbench and + ulp. */ +#define PL_SIG(v, t, a, f, ...) PL_DECL_##v##t##a (f) |