]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/arm-optimized-routines/math/v_pow.c
dma: update to 2022-01-27 snapshot
[FreeBSD/FreeBSD.git] / contrib / arm-optimized-routines / math / v_pow.c
1 /*
2  * Double-precision vector pow function.
3  *
4  * Copyright (c) 2020, Arm Limited.
5  * SPDX-License-Identifier: MIT
6  */
7
8 #include "mathlib.h"
9 #include "v_math.h"
10 #if V_SUPPORTED
11
12 VPCS_ATTR
13 v_f64_t
14 V_NAME(pow) (v_f64_t x, v_f64_t y)
15 {
16   v_f64_t z;
17   for (int lane = 0; lane < v_lanes64 (); lane++)
18     {
19       f64_t sx = v_get_f64 (x, lane);
20       f64_t sy = v_get_f64 (y, lane);
21       f64_t sz = pow (sx, sy);
22       v_set_f64 (&z, lane, sz);
23     }
24   return z;
25 }
26 VPCS_ALIAS
27 #endif