brintos

brintos / llvm-project-archived public Read only

0
0
Text · 612 B · e428734 Raw
29 lines · c
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-exception7 */8 9#include "mathlib.h"10#include "v_math.h"11#if V_SUPPORTED12 13VPCS_ATTR14v_f64_t15V_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}27VPCS_ALIAS28#endif29