Bruteforce - embedded, relaxed ulp requirements (#839)

* Add embedded profile ULP requiremnts for relaxed tests.

* Fixed exp relaxed ULP for embedded.

* Added a utility function, getAllowedUlpError, for determining FP32 ULP.

* Collection of requested changes from PR.

Re-named float_embedded_relaxed_ulps -> relaxed_embedded_error.

Re-ordered Func struct members.
This commit is contained in:
Jeremy Kemp
2020-08-10 13:19:26 +01:00
committed by GitHub
parent ce484988ab
commit 93001e99a4
8 changed files with 286 additions and 135 deletions

View File

@@ -1,6 +1,6 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -14,6 +14,7 @@
// limitations under the License.
//
#include "Utility.h"
#include "FunctionList.h"
#if defined(__PPC__)
// Global varaiable used to hold the FPU control register state. The FPSCR register can not
@@ -167,3 +168,32 @@ void logFunctionInfo(const char *fname, unsigned int float_size, unsigned int is
vlog("%15s %4s %4s",fname, fpSizeStr, fpFastRelaxedStr);
}
float getAllowedUlpError(const Func *f, const bool relaxed)
{
float ulp;
if (relaxed)
{
if (gIsEmbedded)
{
ulp = f->relaxed_embedded_error;
}
else
{
ulp = f->relaxed_error;
}
}
else
{
if (gIsEmbedded)
{
ulp = f->float_embedded_ulps;
}
else
{
ulp = f->float_ulps;
}
}
return ulp;
}