1*936515c7SOverMighty //===-- Performance test for exp2f16 --------------------------------------===// 2*936515c7SOverMighty // 3*936515c7SOverMighty // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*936515c7SOverMighty // See https://llvm.org/LICENSE.txt for license information. 5*936515c7SOverMighty // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*936515c7SOverMighty // 7*936515c7SOverMighty //===----------------------------------------------------------------------===// 8*936515c7SOverMighty 9*936515c7SOverMighty #include "SingleInputSingleOutputPerf.h" 10*936515c7SOverMighty 11*936515c7SOverMighty #include "src/math/exp2f16.h" 12*936515c7SOverMighty 13*936515c7SOverMighty // LLVM libc might be the only libc implementation with support for float16 math 14*936515c7SOverMighty // functions currently. We can't compare our float16 functions against the 15*936515c7SOverMighty // system libc, so we compare them against this placeholder function. 16*936515c7SOverMighty static float16 placeholderf16(float16 x) { return x; } 17*936515c7SOverMighty 18*936515c7SOverMighty int main() { 19*936515c7SOverMighty SINGLE_INPUT_SINGLE_OUTPUT_PERF_EX(float16, LIBC_NAMESPACE::exp2f16, 20*936515c7SOverMighty ::placeholderf16, 20'000, 21*936515c7SOverMighty "exp2f16_perf.log") 22*936515c7SOverMighty } 23