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`
24 lines
818 B
C++
24 lines
818 B
C++
//===-- Performance test for the fmull function ---------------------------===//
|
|
//
|
|
// 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/fmull.h"
|
|
|
|
static constexpr size_t LONG_DOUBLE_ROUNDS = 40;
|
|
|
|
float fmull_placeholder_binary(long double x, long double y) {
|
|
return static_cast<float>(x * y);
|
|
}
|
|
|
|
int main() {
|
|
BINARY_INPUT_SINGLE_OUTPUT_PERF_EX(float, long double, LIBC_NAMESPACE::fmull,
|
|
fmull_placeholder_binary,
|
|
LONG_DOUBLE_ROUNDS, "fmull_perf.log")
|
|
return 0;
|
|
}
|