Path: blob/main/contrib/arm-optimized-routines/math/test/test_defs.h
48254 views
/*1* Helper macros for emitting various details about routines for consumption by2* runulp.sh.3*4* Copyright (c) 2024, Arm Limited.5* SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception.6*/78#define TEST_ULP(f, l) TEST_ULP f l9#define TEST_ULP_NONNEAREST(f, l) TEST_ULP_NONNEAREST f l1011/* Emit routine name if e == 0 and f is expected to correctly trigger fenv12exceptions. e allows declaration to be emitted conditionally on13WANT_SIMD_EXCEPT - defer expansion by one pass to allow those flags to be14expanded properly. */15#define TEST_DISABLE_FENV(f) TEST_DISABLE_FENV f16#define TEST_DISABLE_FENV_IF_NOT(f, e) TEST_DISABLE_FENV_IF_NOT_ (f, e)17#define TEST_DISABLE_FENV_IF_NOT_(f, e) TEST_DISABLE_FENV_IF_NOT_##e (f)18#define TEST_DISABLE_FENV_IF_NOT_0(f) TEST_DISABLE_FENV (f)19#define TEST_DISABLE_FENV_IF_NOT_1(f)2021#define TEST_INTERVAL(f, lo, hi, n) TEST_INTERVAL f lo hi n22#define TEST_SYM_INTERVAL(f, lo, hi, n) \23TEST_INTERVAL (f, lo, hi, n) \24TEST_INTERVAL (f, -lo, -hi, n)25// clang-format off26#define TEST_INTERVAL2(f, xlo, xhi, ylo, yhi, n) \27TEST_INTERVAL f xlo,ylo xhi,yhi n28// clang-format on2930#define TEST_CONTROL_VALUE(f, c) TEST_CONTROL_VALUE f c313233