mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 15:19:02 +00:00
remove min max macros (#1310)
* remove the MIN and MAX macros and use the std versions instead * fix formatting * fix Arm build * remove additional MIN and MAX macros from compat.h
This commit is contained in:
@@ -496,7 +496,8 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
|
||||
}
|
||||
|
||||
|
||||
for (auto k = MAX(1, gMinVectorSizeIndex); k < gMaxVectorSizeIndex; k++)
|
||||
for (auto k = std::max(1U, gMinVectorSizeIndex);
|
||||
k < gMaxVectorSizeIndex; k++)
|
||||
{
|
||||
q = (cl_long *)out[k];
|
||||
// If we aren't getting the correctly rounded result
|
||||
|
||||
@@ -485,7 +485,8 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
for (auto k = MAX(1, gMinVectorSizeIndex); k < gMaxVectorSizeIndex; k++)
|
||||
for (auto k = std::max(1U, gMinVectorSizeIndex);
|
||||
k < gMaxVectorSizeIndex; k++)
|
||||
{
|
||||
q = out[k];
|
||||
// If we aren't getting the correctly rounded result
|
||||
|
||||
@@ -304,7 +304,8 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
|
||||
}
|
||||
|
||||
|
||||
for (auto k = MAX(1, gMinVectorSizeIndex); k < gMaxVectorSizeIndex; k++)
|
||||
for (auto k = std::max(1U, gMinVectorSizeIndex);
|
||||
k < gMaxVectorSizeIndex; k++)
|
||||
{
|
||||
q = out[k];
|
||||
// If we aren't getting the correctly rounded result
|
||||
|
||||
@@ -309,8 +309,8 @@ cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
|
||||
}
|
||||
|
||||
|
||||
for (auto k = MAX(1, gMinVectorSizeIndex); k < gMaxVectorSizeIndex;
|
||||
k++)
|
||||
for (auto k = std::max(1U, gMinVectorSizeIndex);
|
||||
k < gMaxVectorSizeIndex; k++)
|
||||
{
|
||||
q = out[k];
|
||||
// If we aren't getting the correctly rounded result
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "sleep.h"
|
||||
#include "utility.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
@@ -1239,7 +1240,7 @@ float Bruteforce_Ulp_Error_Double(double test, long double reference)
|
||||
|
||||
// The unbiased exponent of the ulp unit place
|
||||
int ulp_exp =
|
||||
DBL_MANT_DIG - 1 - MAX(ilogbl(reference), DBL_MIN_EXP - 1);
|
||||
DBL_MANT_DIG - 1 - std::max(ilogbl(reference), DBL_MIN_EXP - 1);
|
||||
|
||||
// Scale the exponent of the error
|
||||
float result = (float)scalbnl(testVal - reference, ulp_exp);
|
||||
@@ -1255,7 +1256,7 @@ float Bruteforce_Ulp_Error_Double(double test, long double reference)
|
||||
// reference is a normal power of two or a zero
|
||||
// The unbiased exponent of the ulp unit place
|
||||
int ulp_exp =
|
||||
DBL_MANT_DIG - 1 - MAX(ilogbl(reference) - 1, DBL_MIN_EXP - 1);
|
||||
DBL_MANT_DIG - 1 - std::max(ilogbl(reference) - 1, DBL_MIN_EXP - 1);
|
||||
|
||||
// allow correctly rounded results to pass through unmolested. (We might add
|
||||
// error to it below.) There is something of a performance optimization here
|
||||
|
||||
Reference in New Issue
Block a user