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 log2f.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_LOG2F_H
15#define LLVM_LIBC_SRC___SUPPORT_MATH_LOG2F_H
16
17#include "src/__support/common.h"
18#include "src/__support/macros/config.h"
19#include "src/__support/macros/optimization.h"
20
21#ifndef LIBC_MATH_LOG2F_IMPL
22#define LIBC_MATH_LOG2F_IMPL double_eval
23#endif // !LIBC_MATH_LOG2F_IMPL
24
25#if LIBC_MATH_IMPL_IS(LIBC_MATH_LOG2F_IMPL, double_eval)
26#include "src/__support/math/log2f_double_eval.h"
27#else
28#error "Unsupported LIBC_MATH_LOG2F_IMPL"
29#endif // LIBC_MATH_IMPL_IS
30
31namespace LIBC_NAMESPACE_DECL {
32namespace math {
33
34using LIBC_MATH_LOG2F_IMPL::log2f;
35
36} // namespace math
37} // namespace LIBC_NAMESPACE_DECL
38
39#undef LIBC_MATH_LOG2F_IMPL
40
41#endif // LLVM_LIBC_SRC___SUPPORT_MATH_LOG2F_H
42