diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2025-01-10 10:34:52 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2025-01-10 10:39:34 +0000 |
commit | 9d1de25930735261c16ed874a933b4c1f1d9041e (patch) | |
tree | b0cac1c933cc1ecb885c7e757b89ffbf13f1f012 /math/test/test_defs.h | |
parent | edc5c0de794f521eb620d2b6cbaee2434442a8f3 (diff) |
Update the Arm Optimized Routinesvendor/arm-optimized-routines/v25.01vendor/arm-optimized-routines
Import the v25.01 release of the Arm Optimized Routines [1].
[1] https://github.com/ARM-software/optimized-routines/tree/v25.01
Sponsored by: Arm Ltd
Diffstat (limited to 'math/test/test_defs.h')
-rw-r--r-- | math/test/test_defs.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/math/test/test_defs.h b/math/test/test_defs.h new file mode 100644 index 000000000000..d0656c9e1d84 --- /dev/null +++ b/math/test/test_defs.h @@ -0,0 +1,31 @@ +/* + * Helper macros for emitting various details about routines for consumption by + * runulp.sh. + * + * Copyright (c) 2024, Arm Limited. + * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception. + */ + +#define TEST_ULP(f, l) TEST_ULP f l +#define TEST_ULP_NONNEAREST(f, l) TEST_ULP_NONNEAREST f l + +/* Emit routine name if e == 0 and f is expected to correctly trigger fenv + exceptions. e allows declaration to be emitted conditionally on + WANT_SIMD_EXCEPT - defer expansion by one pass to allow those flags to be + expanded properly. */ +#define TEST_DISABLE_FENV(f) TEST_DISABLE_FENV f +#define TEST_DISABLE_FENV_IF_NOT(f, e) TEST_DISABLE_FENV_IF_NOT_ (f, e) +#define TEST_DISABLE_FENV_IF_NOT_(f, e) TEST_DISABLE_FENV_IF_NOT_##e (f) +#define TEST_DISABLE_FENV_IF_NOT_0(f) TEST_DISABLE_FENV (f) +#define TEST_DISABLE_FENV_IF_NOT_1(f) + +#define TEST_INTERVAL(f, lo, hi, n) TEST_INTERVAL f lo hi n +#define TEST_SYM_INTERVAL(f, lo, hi, n) \ + TEST_INTERVAL (f, lo, hi, n) \ + TEST_INTERVAL (f, -lo, -hi, n) +// clang-format off +#define TEST_INTERVAL2(f, xlo, xhi, ylo, yhi, n) \ + TEST_INTERVAL f xlo,ylo xhi,yhi n +// clang-format on + +#define TEST_CONTROL_VALUE(f, c) TEST_CONTROL_VALUE f c |