mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +00:00
Remove gTestFastRelaxed Dependencies in Brute Force (#807)
* The global variable `gTestFastRelaxed` has state which is used to control the behaviour of the compiler flag `-cl-fast-relaxed-math` and the precision testing of relaxed, fp32 and fp64 types. This is confusing since the global variable is being set and read in different translation units, making it very difficult to reason about the logic of the brute force framework. It is particular difficult to follow since the global variables is cached and then turned off in the case of fp32 and f64 in order to use the same code path as relaxed testing, after it is then turned back on. * Remove uses of the global variable outside of `main.cpp` (the global variable remains in use within `main.cpp` since it is a command line option and used to turn of relaxed testing completely). Replace all uses of the global variable with boolean `relaxedMode` which is passed as a function paramter but replaces `gTestFastRelaxed` semantically.
This commit is contained in:
@@ -64,7 +64,6 @@ extern int gSkipCorrectnessTesting;
|
||||
extern int gMeasureTimes;
|
||||
extern int gReportAverageTimes;
|
||||
extern int gForceFTZ;
|
||||
extern volatile int gTestFastRelaxed;
|
||||
extern int gFastRelaxedDerived;
|
||||
extern int gWimpyMode;
|
||||
extern int gHasDouble;
|
||||
@@ -97,8 +96,11 @@ float Bruteforce_Ulp_Error_Double( double test, long double reference );
|
||||
|
||||
uint64_t GetTime( void );
|
||||
double SubtractTime( uint64_t endTime, uint64_t startTime );
|
||||
int MakeKernel( const char **c, cl_uint count, const char *name, cl_kernel *k, cl_program *p );
|
||||
int MakeKernels( const char **c, cl_uint count, const char *name, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
int MakeKernel(const char **c, cl_uint count, const char *name, cl_kernel *k,
|
||||
cl_program *p, bool relaxedMode);
|
||||
int MakeKernels(const char **c, cl_uint count, const char *name,
|
||||
cl_uint kernel_count, cl_kernel *k, cl_program *p,
|
||||
bool relaxedMode);
|
||||
|
||||
// used to convert a bucket of bits into a search pattern through double
|
||||
static inline double DoubleFromUInt32( uint32_t bits );
|
||||
|
||||
Reference in New Issue
Block a user