llvm/libc/test/src/math/performance_testing/nearest_integer_funcs_perf.cpp

//===-- Performance test for nearest integer functions --------------------===//
//
// 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 "src/__support/FPUtil/FPBits.h"
#include "src/math/ceilf.h"
#include "src/math/ceilf16.h"
#include "src/math/floorf.h"
#include "src/math/floorf16.h"
#include "src/math/rintf.h"
#include "src/math/rintf16.h"
#include "src/math/roundevenf.h"
#include "src/math/roundevenf16.h"
#include "src/math/roundf.h"
#include "src/math/roundf16.h"
#include "src/math/truncf.h"
#include "src/math/truncf16.h"
#include "test/UnitTest/RoundingModeUtils.h"
#include "test/src/math/performance_testing/Timer.h"

#include <fstream>
#include <math.h>

ForceRoundingMode;
RoundingMode;

namespace LIBC_NAMESPACE::testing {

template <typename T> class NearestIntegerPerf {};

} // namespace LIBC_NAMESPACE::testing

#define NEAREST_INTEGER_PERF(T, my_func, other_func, rounds, filename)

static constexpr size_t FLOAT16_ROUNDS =;
static constexpr size_t FLOAT_ROUNDS =;

// 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.
float16 placeholderf16(float16 x) {}

// The system libc might not provide the roundeven* C23 math functions either.
float placeholderf(float x) {}

int main() {}