mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 06:06:34 +08:00
- Merges `BinaryOpSingleOutputPerf.h` and `SingleInputSingleOutputPerf.h` files into a unified `PerfTest.h` and update all performance tests to use this. - Improve the output printed to log file for tests. - Removes unused `run_diff` method and redundant `run_perf` call in `BINARY_INPUT_SINGLE_OUTPUT_PERF_EX` (previously `BINARY_OP_SINGLE_OUTPUT_PERF_EX`) - Change `BINARY_INPUT_SINGLE_OUTPUT_PERF_EX` and `SINGLE_INPUT_SINGLE_OUTPUT_PERF` to not define `main`
22 lines
914 B
C++
22 lines
914 B
C++
//===-- Performance test for exp10f16 -------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "PerfTest.h"
|
|
#include "src/math/exp10f16.h"
|
|
|
|
// LLVM libc might be the only libc implementation with support for float16 math
|
|
// functions currently. We can't compare our float16 functions against the
|
|
// system libc, so we compare them against this placeholder function.
|
|
static float16 placeholderf16(float16 x) { return x; }
|
|
|
|
int main() {
|
|
SINGLE_INPUT_SINGLE_OUTPUT_PERF_EX(float16, LIBC_NAMESPACE::exp10f16,
|
|
::placeholderf16, 20'000,
|
|
"exp10f16_perf.log")
|
|
}
|