File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
libc/test/src/math/performance_testing Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,17 @@ add_perf_binary(
153
153
-fno-builtin
154
154
)
155
155
156
+ add_perf_binary (
157
+ exp10f16_perf
158
+ SRCS
159
+ exp10f16_perf.cpp
160
+ DEPENDS
161
+ .single_input_single_output_diff
162
+ libc.src.math.exp10f16
163
+ COMPILE_OPTIONS
164
+ -fno-builtin
165
+ )
166
+
156
167
add_perf_binary (
157
168
exp2f_perf
158
169
SRCS
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments