CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
103 lines
1.6 KiB
C++
103 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <hip_test_common.hh>
|
|
#include <cmath>
|
|
|
|
#pragma GCC diagnostic ignored "-Wall"
|
|
#pragma clang diagnostic ignored "-Wunused-variable"
|
|
|
|
__host__ static void double_precision_math_functions() {
|
|
int iX;
|
|
double fX, fY;
|
|
|
|
acos(1.0);
|
|
acosh(1.0);
|
|
asin(0.0);
|
|
asinh(0.0);
|
|
atan(0.0);
|
|
atan2(0.0, 1.0);
|
|
atanh(0.0);
|
|
cbrt(0.0);
|
|
ceil(0.0);
|
|
copysign(1.0, -2.0);
|
|
cos(0.0);
|
|
cosh(0.0);
|
|
erf(0.0);
|
|
erfc(0.0);
|
|
exp(0.0);
|
|
#ifdef __unix__
|
|
exp10(0.0);
|
|
#endif
|
|
exp2(0.0);
|
|
expm1(0.0);
|
|
fabs(1.0);
|
|
fdim(1.0, 0.0);
|
|
floor(0.0);
|
|
fma(1.0, 2.0, 3.0);
|
|
fmax(0.0, 0.0);
|
|
fmin(0.0, 0.0);
|
|
fmod(0.0, 1.0);
|
|
frexp(0.0, &iX);
|
|
hypot(1.0, 0.0);
|
|
ilogb(1.0);
|
|
std::isfinite(0.0);
|
|
std::isinf(0.0);
|
|
std::isnan(0.0);
|
|
#ifdef __unix__
|
|
j0(0.0);
|
|
j1(0.0);
|
|
jn(-1.0, 1.0);
|
|
#elif _WIN64
|
|
_j0(0.0);
|
|
_j1(0.0);
|
|
_jn(-1.0, 1.0);
|
|
#endif
|
|
ldexp(0.0, 0);
|
|
llrint(0.0);
|
|
llround(0.0);
|
|
log(1.0);
|
|
log10(1.0);
|
|
log1p(-1.0);
|
|
log2(1.0);
|
|
logb(1.0);
|
|
lrint(0.0);
|
|
lround(0.0);
|
|
modf(0.0, &fX);
|
|
nan("1");
|
|
nearbyint(0.0);
|
|
fX = 1.0;
|
|
pow(1.0, 0.0);
|
|
remainder(2.0, 1.0);
|
|
remquo(1.0, 2.0, &iX);
|
|
rint(1.0);
|
|
round(0.0);
|
|
scalbln(0.0, 1);
|
|
scalbn(0.0, 1);
|
|
std::signbit(1.0);
|
|
sin(0.0);
|
|
#ifdef _unix__
|
|
sincos(0.0, &fX, &fY);
|
|
#endif
|
|
sinh(0.0);
|
|
sqrt(0.0);
|
|
tan(0.0);
|
|
tanh(0.0);
|
|
tgamma(2.0);
|
|
trunc(0.0);
|
|
#ifdef __unix__
|
|
y0(1.0);
|
|
y1(1.0);
|
|
yn(1, 1.0);
|
|
#elif _WIN64
|
|
_y0(1.0);
|
|
_y1(1.0);
|
|
_yn(1, 1.0);
|
|
#endif
|
|
}
|
|
|
|
HIP_TEST_CASE(Unit_DoublePrecisionMathHost) { double_precision_math_functions(); }
|