| 1 | //===-- Performance test for the fmul function ----------------------------===// |
| 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 "PerfTest.h" |
| 10 | #include "src/__support/FPUtil/generic/mul.h" |
| 11 | #include "src/math/fmul.h" |
| 12 | |
| 13 | static constexpr size_t DOUBLE_ROUNDS = 40; |
| 14 | |
| 15 | float fmul_placeholder_binary(double x, double y) { |
| 16 | return LIBC_NAMESPACE::fputil::generic::mul<float>(x, y); |
| 17 | } |
| 18 | |
| 19 | int main() { |
| 20 | BINARY_INPUT_SINGLE_OUTPUT_PERF_EX(float, double, LIBC_NAMESPACE::fmul, |
| 21 | fmul_placeholder_binary, DOUBLE_ROUNDS, |
| 22 | "fmul_perf.log" ) |
| 23 | return 0; |
| 24 | } |
| 25 | |