Update directed tests with all supported math functions

Change-Id: Id32a94313288e78bf2957bd19efb30877e20221d
This commit is contained in:
Maneesh Gupta
2016-08-18 12:38:25 +05:30
parent 69f005f5b2
commit ad2deaabc8
4 changed files with 108 additions and 108 deletions
@@ -47,9 +47,9 @@ __device__ void double_precision_math_functions()
//cyl_bessel_i1(0.0);
erf(0.0);
erfc(0.0);
//erfcinv(2.0);
//erfcx(0.0);
//erfinv(1.0);
erfcinv(2.0);
erfcx(0.0);
erfinv(1.0);
exp(0.0);
exp10(0.0);
exp2(0.0);
@@ -67,46 +67,46 @@ __device__ void double_precision_math_functions()
isfinite(0.0);
isinf(0.0);
isnan(0.0);
//j0(0.0);
//j1(0.0);
//jn(-1.0, 1.0);
j0(0.0);
j1(0.0);
jn(-1.0, 1.0);
ldexp(0.0, 0);
//lgamma(1.0);
//llrint(0.0);
//llround(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);
lrint(0.0);
lround(0.0);
//modf(0.0, &fX);
nan("1");
nearbyint(0.0);
//nextafter(0.0);
//fX = 1.0; norm(1, &fX);
//norm3d(1.0, 0.0, 0.0);
//norm4d(1.0, 0.0, 0.0, 0.0);
//normcdf(0.0);
norm3d(1.0, 0.0, 0.0);
norm4d(1.0, 0.0, 0.0, 0.0);
normcdf(0.0);
//normcdfinv(1.0);
pow(1.0, 0.0);
//rcbrt(1.0);
rcbrt(1.0);
remainder(2.0, 1.0);
//remquo(1.0, 2.0, &iX);
//rhypot(0.0, 1.0);
//rint(1.0);
//fX = 1.0; rnorm(1, &fX);
//rnorm3d(0.0, 0.0, 1.0);
//rnorm4d(0.0, 0.0, 0.0, 1.0);
rhypot(0.0, 1.0);
rint(1.0);
fX = 1.0; rnorm(1, &fX);
rnorm3d(0.0, 0.0, 1.0);
rnorm4d(0.0, 0.0, 0.0, 1.0);
round(0.0);
rsqrt(1.0);
//scalbln(0.0, 1);
scalbln(0.0, 1);
scalbn(0.0, 1);
signbit(1.0);
sin(0.0);
//sincos(0.0, &fX, &fY);
//sincospi(0.0, &fX, &fY);
sincos(0.0, &fX, &fY);
sincospi(0.0, &fX, &fY);
sinh(0.0);
sinpi(0.0);
sqrt(0.0);
@@ -114,9 +114,9 @@ __device__ void double_precision_math_functions()
tanh(0.0);
tgamma(2.0);
trunc(0.0);
//y0(1.0);
//y1(1.0);
//yn(1, 1.0);
y0(1.0);
y1(1.0);
yn(1, 1.0);
}
__global__ void compileDoublePrecisionMathOnDevice(hipLaunchParm lp, int ignored)
@@ -47,9 +47,9 @@ __host__ void double_precision_math_functions()
//cyl_bessel_i1(0.0);
erf(0.0);
erfc(0.0);
//erfcinv(2.0);
//erfcx(0.0);
//erfinv(1.0);
erfcinv(2.0);
erfcx(0.0);
erfinv(1.0);
exp(0.0);
exp10(0.0);
exp2(0.0);
@@ -67,46 +67,46 @@ __host__ void double_precision_math_functions()
isfinite(0.0);
isinf(0.0);
isnan(0.0);
///j0(0.0);
///j1(0.0);
///jn(-1.0, 1.0);
j0(0.0);
j1(0.0);
jn(-1.0, 1.0);
ldexp(0.0, 0);
///lgamma(1.0);
///llrint(0.0);
///llround(0.0);
lgamma(1.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);
lrint(0.0);
lround(0.0);
modf(0.0, &fX);
///nan("1");
nan("1");
nearbyint(0.0);
//nextafter(0.0);
//fX = 1.0; norm(1, &fX);
//norm3d(1.0, 0.0, 0.0);
//norm4d(1.0, 0.0, 0.0, 0.0);
//normcdf(0.0);
//normcdfinv(1.0);
norm3d(1.0, 0.0, 0.0);
norm4d(1.0, 0.0, 0.0, 0.0);
normcdf(0.0);
normcdfinv(1.0);
pow(1.0, 0.0);
//rcbrt(1.0);
rcbrt(1.0);
remainder(2.0, 1.0);
remquo(1.0, 2.0, &iX);
//rhypot(0.0, 1.0);
///rint(1.0);
//fX = 1.0; rnorm(1, &fX);
//rnorm3d(0.0, 0.0, 1.0);
//rnorm4d(0.0, 0.0, 0.0, 1.0);
rhypot(0.0, 1.0);
rint(1.0);
fX = 1.0; rnorm(1, &fX);
rnorm3d(0.0, 0.0, 1.0);
rnorm4d(0.0, 0.0, 0.0, 1.0);
round(0.0);
rsqrt(1.0);
///scalbln(0.0, 1);
scalbln(0.0, 1);
scalbn(0.0, 1);
signbit(1.0);
sin(0.0);
sincos(0.0, &fX, &fY);
//sincospi(0.0, &fX, &fY);
sincospi(0.0, &fX, &fY);
sinh(0.0);
sinpi(0.0);
sqrt(0.0);
@@ -114,9 +114,9 @@ __host__ void double_precision_math_functions()
tanh(0.0);
tgamma(2.0);
trunc(0.0);
///y0(1.0);
///y1(1.0);
///yn(1, 1.0);
y0(1.0);
y1(1.0);
yn(1, 1.0);
}
static void compileOnHost()
@@ -46,17 +46,17 @@ __device__ void single_precision_math_functions()
//cyl_bessel_i0f(0.0f);
//cyl_bessel_i1f(0.0f);
erfcf(0.0f);
//erfcinvf(2.0f);
//erfcxf(0.0f);
erfcinvf(2.0f);
erfcxf(0.0f);
erff(0.0f);
//erfinvf(1.0f);
erfinvf(1.0f);
exp10f(0.0f);
exp2f(0.0f);
expf(0.0f);
expm1f(0.0f);
fabsf(1.0f);
fdimf(1.0f, 0.0f);
//fdividef(0.0f, 1.0f);
fdividef(0.0f, 1.0f);
floorf(0.0f);
fmaf(1.0f, 2.0f, 3.0f);
fmaxf(0.0f, 0.0f);
@@ -68,45 +68,45 @@ __device__ void single_precision_math_functions()
isfinite(0.0f);
isinf(0.0f);
isnan(0.0f);
//j0f(0.0f);
//j1f(0.0f);
//jnf(-1.0f, 1.0f);
j0f(0.0f);
j1f(0.0f);
jnf(-1.0f, 1.0f);
ldexpf(0.0f, 0);
//lgammaf(1.0f);
//llrintf(0.0f);
//llroundf(0.0f);
llrintf(0.0f);
llroundf(0.0f);
log10f(1.0f);
log1pf(-1.0f);
log2f(1.0f);
logbf(1.0f);
logf(1.0f);
//lrintf(0.0f);
//lroundf(0.0f);
lrintf(0.0f);
lroundf(0.0f);
//modff(0.0f, &fX);
nanf("1");
nearbyintf(0.0f);
//nextafterf(0.0f);
//norm3df(1.0f, 0.0f, 0.0f);
//norm4df(1.0f, 0.0f, 0.0f, 0.0f);
//normcdff(0.0f);
//normcdfinvf(1.0f);
//fX = 1.0f; normf(1, &fX);
norm3df(1.0f, 0.0f, 0.0f);
norm4df(1.0f, 0.0f, 0.0f, 0.0f);
normcdff(0.0f);
normcdfinvf(1.0f);
fX = 1.0f; normf(1, &fX);
powf(1.0f, 0.0f);
//rcbrtf(1.0f);
rcbrtf(1.0f);
remainderf(2.0f, 1.0f);
//remquof(1.0f, 2.0f, &iX);
//rhypotf(0.0f, 1.0f);
//rintf(1.0f);
//rnorm3df(0.0f, 0.0f, 1.0f);
//rnorm4df(0.0f, 0.0f, 0.0f, 1.0f);
//fX = 1.0f; rnormf(1, &fX);
rhypotf(0.0f, 1.0f);
rintf(1.0f);
rnorm3df(0.0f, 0.0f, 1.0f);
rnorm4df(0.0f, 0.0f, 0.0f, 1.0f);
fX = 1.0f; rnormf(1, &fX);
roundf(0.0f);
rsqrtf(1.0f);
//scalblnf(0.0f, 1);
scalblnf(0.0f, 1);
scalbnf(0.0f, 1);
signbit(1.0f);
//sincosf(0.0f, &fX, &fY);
//sincospif(0.0f, &fX, &fY);
sincosf(0.0f, &fX, &fY);
sincospif(0.0f, &fX, &fY);
sinf(0.0f);
sinhf(0.0f);
sinpif(0.0f);
@@ -115,9 +115,9 @@ __device__ void single_precision_math_functions()
tanhf(0.0f);
tgammaf(2.0f);
truncf(0.0f);
//y0f(1.0f);
//y1f(1.0f);
//ynf(1, 1.0f);
y0f(1.0f);
y1f(1.0f);
ynf(1, 1.0f);
}
__global__ void compileSinglePrecisionMathOnDevice(hipLaunchParm lp, int ignored)
@@ -46,17 +46,17 @@ __host__ void single_precision_math_functions()
//cyl_bessel_i0f(0.0f);
//cyl_bessel_i1f(0.0f);
erfcf(0.0f);
//erfcinvf(2.0f);
//erfcxf(0.0f);
erfcinvf(2.0f);
erfcxf(0.0f);
erff(0.0f);
//erfinvf(1.0f);
erfinvf(1.0f);
exp10f(0.0f);
exp2f(0.0f);
expf(0.0f);
expm1f(0.0f);
fabsf(1.0f);
fdimf(1.0f, 0.0f);
//fdividef(0.0f, 1.0f);
fdividef(0.0f, 1.0f);
floorf(0.0f);
fmaf(1.0f, 2.0f, 3.0f);
fmaxf(0.0f, 0.0f);
@@ -68,45 +68,45 @@ __host__ void single_precision_math_functions()
isfinite(0.0f);
isinf(0.0f);
isnan(0.0f);
///j0f(0.0f);
///j1f(0.0f);
///jnf(-1.0f, 1.0f);
j0f(0.0f);
j1f(0.0f);
jnf(-1.0f, 1.0f);
ldexpf(0.0f, 0);
///lgammaf(1.0f);
///llrintf(0.0f);
///llroundf(0.0f);
lgammaf(1.0f);
llrintf(0.0f);
llroundf(0.0f);
log10f(1.0f);
log1pf(-1.0f);
log2f(1.0f);
logbf(1.0f);
logf(1.0f);
///lrintf(0.0f);
///lroundf(0.0f);
lrintf(0.0f);
lroundf(0.0f);
modff(0.0f, &fX);
///nanf("1");
nanf("1");
nearbyintf(0.0f);
//nextafterf(0.0f);
//norm3df(1.0f, 0.0f, 0.0f);
//norm4df(1.0f, 0.0f, 0.0f, 0.0f);
//normcdff(0.0f);
//normcdfinvf(1.0f);
norm3df(1.0f, 0.0f, 0.0f);
norm4df(1.0f, 0.0f, 0.0f, 0.0f);
normcdff(0.0f);
normcdfinvf(1.0f);
//fX = 1.0f; normf(1, &fX);
powf(1.0f, 0.0f);
//rcbrtf(1.0f);
rcbrtf(1.0f);
remainderf(2.0f, 1.0f);
remquof(1.0f, 2.0f, &iX);
//rhypotf(0.0f, 1.0f);
///rintf(1.0f);
//rnorm3df(0.0f, 0.0f, 1.0f);
//rnorm4df(0.0f, 0.0f, 0.0f, 1.0f);
//fX = 1.0f; rnormf(1, &fX);
rhypotf(0.0f, 1.0f);
rintf(1.0f);
rnorm3df(0.0f, 0.0f, 1.0f);
rnorm4df(0.0f, 0.0f, 0.0f, 1.0f);
fX = 1.0f; rnormf(1, &fX);
roundf(0.0f);
rsqrtf(1.0f);
///scalblnf(0.0f, 1);
scalblnf(0.0f, 1);
scalbnf(0.0f, 1);
signbit(1.0f);
sincosf(0.0f, &fX, &fY);
//sincospif(0.0f, &fX, &fY);
sincospif(0.0f, &fX, &fY);
sinf(0.0f);
sinhf(0.0f);
sinpif(0.0f);
@@ -115,9 +115,9 @@ __host__ void single_precision_math_functions()
tanhf(0.0f);
tgammaf(2.0f);
truncf(0.0f);
///y0f(1.0f);
///y1f(1.0f);
///ynf(1, 1.0f);
y0f(1.0f);
y1f(1.0f);
ynf(1, 1.0f);
}
static void compileOnHost()