Conversion to testHarness - math_brute_force

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
Radek Szymanski
2016-03-30 16:55:48 +01:00
committed by Kévin Petit
parent aadfe3c5a7
commit 084828bbd8
14 changed files with 1115 additions and 332 deletions

View File

@@ -1149,7 +1149,7 @@ static cl_int TestDouble( cl_uint job_id, cl_uint thread_id, void *data )
{
cl_double test = ((cl_double*) q)[j];
long double correct = func.f_fi( s[j], s2[j] );
float err = Ulp_Error_Double( test, correct );
float err = Bruteforce_Ulp_Error_Double( test, correct );
int fail = ! (fabsf(err) <= ulps);
if( fail && ftz )
@@ -1167,8 +1167,8 @@ static cl_int TestDouble( cl_uint job_id, cl_uint thread_id, void *data )
{
long double correct2 = func.f_fi( 0.0, s2[j] );
long double correct3 = func.f_fi( -0.0, s2[j] );
float err2 = Ulp_Error_Double( test, correct2 );
float err3 = Ulp_Error_Double( test, correct3 );
float err2 = Bruteforce_Ulp_Error_Double( test, correct2 );
float err3 = Bruteforce_Ulp_Error_Double( test, correct3 );
fail = fail && ((!(fabsf(err2) <= ulps)) && (!(fabsf(err3) <= ulps)));
if( fabsf( err2 ) < fabsf(err ) )
err = err2;