xref: /llvm-project/libc/test/src/math/performance_testing/exp10f16_perf.cpp (revision 59338ad8c5154769ec8225db0386956161f99fce)
1 //===-- Performance test for exp10f16 -------------------------------------===//
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 #include "SingleInputSingleOutputPerf.h"
10 
11 #include "src/math/exp10f16.h"
12 
13 // LLVM libc might be the only libc implementation with support for float16 math
14 // functions currently. We can't compare our float16 functions against the
15 // system libc, so we compare them against this placeholder function.
16 static float16 placeholderf16(float16 x) { return x; }
17 
18 int main() {
19   SINGLE_INPUT_SINGLE_OUTPUT_PERF_EX(float16, LIBC_NAMESPACE::exp10f16,
20                                      ::placeholderf16, 20'000,
21                                      "exp10f16_perf.log")
22 }
23