added normcdf support

Change-Id: I4887bc588589ed067eaa339d5eccd988c1c5d649


[ROCm/clr commit: 20b991e99a]
This commit is contained in:
Aditya Atluri
2016-06-11 17:05:46 -05:00
committed by Maneesh Gupta
parent 449f868019
commit 4e46d95dac
+12 -1
View File
@@ -228,7 +228,14 @@ __device__ float norm4df(float a, float b, float c, float d)
float y = c*c + d*d;
return hc::precise_math::sqrtf(x+y);
}
__device__ float normcdff(float y);
/*
The below conversion seems easy, takes a
full page of integral calculus to deduce the following equation
*/
__device__ float normcdff(float y)
{
return ((hc::precise_math::erff(y)/1.41421356237) + 1)/2;
}
__device__ float normcdfinvf(float y);
__device__ float normf(int dim, const float *a)
{
@@ -541,6 +548,10 @@ __device__ double norm4d(double a, double b, double c, double d)
double y = c*c + d*d;
return hc::precise_math::sqrt(x+y);
}
__device__ double normcdf(float y)
{
return ((hc::precise_math::erf(y)/1.41421356237) + 1)/2;
}
__device__ double pow(double x, double y)
{
return hc::precise_math::pow(x, y);