1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// Implementation header for powf.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_POWF_H
15#define LLVM_LIBC_SRC___SUPPORT_MATH_POWF_H
16
17#include "src/__support/common.h"
18#include "src/__support/macros/config.h"
19#include "src/__support/macros/optimization.h"
20#include "src/__support/macros/properties/cpu_features.h"
21
22#if defined(LIBC_MATH_HAS_SKIP_ACCURATE_PASS) && \
23 (defined(LIBC_MATH_HAS_SMALL_TABLES) || \
24 defined(LIBC_MATH_HAS_INTERMEDIATE_COMP_IN_FLOAT))
25
26#include "src/__support/math/powf_float_eval.h"
27#define LIBC_MATH_POWF_IMPL float_eval
28
29#else // !LIBC_MATH_HAS_SKIP_ACCURATE_PASS
30#include "src/__support/math/powf_double_eval.h"
31#define LIBC_MATH_POWF_IMPL double_eval
32
33#endif // LIBC_MATH_HAS_SKIP_ACCURATE_PASS
34
35namespace LIBC_NAMESPACE_DECL {
36namespace math {
37
38using LIBC_MATH_POWF_IMPL::powf;
39
40} // namespace math
41} // namespace LIBC_NAMESPACE_DECL
42
43#undef LIBC_MATH_POWF_IMPL
44
45#endif // LLVM_LIBC_SRC___SUPPORT_MATH_POWF_H
46