mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-21 23:09:01 +00:00
Add more relaxed math conformance tests (#1079)
* Add relaxed tests for functions (in an implementation that uses derived functions) that define an absolute ULP error requirement, but were not tested in the current conformance suite * acos * asin * atan * cospi * sinpi * log10
This commit is contained in:
@@ -629,6 +629,15 @@ static cl_int TestFloat( cl_uint job_id, cl_uint thread_id, void *data )
|
||||
fail = ! (fabsf(abs_error) <= ulps);
|
||||
use_abs_error = 1;
|
||||
}
|
||||
if (strcmp(fname, "sinpi") == 0
|
||||
|| strcmp(fname, "cospi") == 0)
|
||||
{
|
||||
if (s[j] >= -1.0 && s[j] <= 1.0)
|
||||
{
|
||||
fail = !(fabsf(abs_error) <= ulps);
|
||||
use_abs_error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( strcmp(fname, "reciprocal") == 0 )
|
||||
{
|
||||
@@ -663,7 +672,8 @@ static cl_int TestFloat( cl_uint job_id, cl_uint thread_id, void *data )
|
||||
}
|
||||
// Else fast math derived implementation does not require ULP verification
|
||||
}
|
||||
if ( strcmp(fname,"log") == 0 || strcmp(fname,"log2") == 0 )
|
||||
if (strcmp(fname, "log") == 0 || strcmp(fname, "log2") == 0
|
||||
|| strcmp(fname, "log10") == 0)
|
||||
{
|
||||
if( s[j] >= 0.5 && s[j] <= 2 )
|
||||
{
|
||||
@@ -674,7 +684,6 @@ static cl_int TestFloat( cl_uint job_id, cl_uint thread_id, void *data )
|
||||
ulps = gIsEmbedded ? job->f->float_embedded_ulps : job->f->float_ulps;
|
||||
fail = ! (fabsf(err) <= ulps);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user