22 lines · cpp
1//===-- Performance test for exp2f16 --------------------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#include "PerfTest.h"10#include "src/math/exp2f16.h"11 12// LLVM libc might be the only libc implementation with support for float16 math13// functions currently. We can't compare our float16 functions against the14// system libc, so we compare them against this placeholder function.15static float16 placeholderf16(float16 x) { return x; }16 17int main() {18 SINGLE_INPUT_SINGLE_OUTPUT_PERF_EX(float16, LIBC_NAMESPACE::exp2f16,19 ::placeholderf16, 20'000,20 "exp2f16_perf.log")21}22