1 /*
2 * Function wrappers for mathbench.
3 *
4 * Copyright (c) 2022-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
6 */
7
8 #if WANT_SIMD_TESTS && defined(__vpcs)
9
10 __vpcs static v_float
xy_Z_powf(v_float x)11 xy_Z_powf (v_float x)
12 {
13 return _ZGVnN4vv_powf (x, x);
14 }
15
16 __vpcs static v_float
x_Z_powf(v_float x)17 x_Z_powf (v_float x)
18 {
19 return _ZGVnN4vv_powf (x, v_float_dup (23.4));
20 }
21
22 __vpcs static v_float
y_Z_powf(v_float x)23 y_Z_powf (v_float x)
24 {
25 return _ZGVnN4vv_powf (v_float_dup (2.34), x);
26 }
27
28 __vpcs static v_double
xy_Z_pow(v_double x)29 xy_Z_pow (v_double x)
30 {
31 return _ZGVnN2vv_pow (x, x);
32 }
33
34 #endif
35
36 static double
xypow(double x)37 xypow (double x)
38 {
39 return pow (x, x);
40 }
41
42 static float
xypowf(float x)43 xypowf (float x)
44 {
45 return powf (x, x);
46 }
47
48 static double
xpow(double x)49 xpow (double x)
50 {
51 return pow (x, 23.4);
52 }
53
54 static float
xpowf(float x)55 xpowf (float x)
56 {
57 return powf (x, 23.4f);
58 }
59
60 static double
ypow(double x)61 ypow (double x)
62 {
63 return pow (2.34, x);
64 }
65
66 static float
ypowf(float x)67 ypowf (float x)
68 {
69 return powf (2.34f, x);
70 }
71
72 static float
sincosf_wrap(float x)73 sincosf_wrap (float x)
74 {
75 float s, c;
76 sincosf (x, &s, &c);
77 return s + c;
78 }
79