1 | /* |
2 | * Double-precision vector pow function. |
3 | * |
4 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
5 | * See https://llvm.org/LICENSE.txt for license information. |
6 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
7 | */ |
8 | |
9 | #include "mathlib.h" |
10 | #include "v_math.h" |
11 | #if V_SUPPORTED |
12 | |
13 | VPCS_ATTR |
14 | v_f64_t |
15 | V_NAME(pow) (v_f64_t x, v_f64_t y) |
16 | { |
17 | v_f64_t z; |
18 | for (int lane = 0; lane < v_lanes64 (); lane++) |
19 | { |
20 | f64_t sx = v_get_f64 (x, lane); |
21 | f64_t sy = v_get_f64 (y, lane); |
22 | f64_t sz = pow (sx, sy); |
23 | v_set_f64 (&z, lane, sz); |
24 | } |
25 | return z; |
26 | } |
27 | VPCS_ALIAS |
28 | #endif |
29 | |