1 /* 2 * Function wrappers for mathbench. 3 * 4 * Copyright (c) 2022, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 6 */ 7 #if WANT_VMATH 8 #if __aarch64__ 9 10 #ifdef __vpcs 11 __vpcs static v_float 12 xy__vn_powf (v_float x) 13 { 14 return __vn_powf (x, x); 15 } 16 17 __vpcs static v_float 18 xy_Z_powf (v_float x) 19 { 20 return _ZGVnN4vv_powf (x, x); 21 } 22 23 __vpcs static v_double 24 xy__vn_pow (v_double x) 25 { 26 return __vn_pow (x, x); 27 } 28 29 __vpcs static v_double 30 xy_Z_pow (v_double x) 31 { 32 return _ZGVnN2vv_pow (x, x); 33 } 34 #endif // __vpcs 35 36 static v_float 37 xy__v_powf (v_float x) 38 { 39 return __v_powf (x, x); 40 } 41 42 static v_double 43 xy__v_pow (v_double x) 44 { 45 return __v_pow (x, x); 46 } 47 #endif // __aarch64__ 48 49 static float 50 xy__s_powf (float x) 51 { 52 return __s_powf (x, x); 53 } 54 55 static double 56 xy__s_pow (double x) 57 { 58 return __s_pow (x, x); 59 } 60 #endif // WANT_VMATH 61 62 static double 63 xypow (double x) 64 { 65 return pow (x, x); 66 } 67 68 static float 69 xypowf (float x) 70 { 71 return powf (x, x); 72 } 73 74 static double 75 xpow (double x) 76 { 77 return pow (x, 23.4); 78 } 79 80 static float 81 xpowf (float x) 82 { 83 return powf (x, 23.4f); 84 } 85 86 static double 87 ypow (double x) 88 { 89 return pow (2.34, x); 90 } 91 92 static float 93 ypowf (float x) 94 { 95 return powf (2.34f, x); 96 } 97 98 static float 99 sincosf_wrap (float x) 100 { 101 float s, c; 102 sincosf (x, &s, &c); 103 return s + c; 104 } 105