mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 00:39:03 +00:00
Remove unnecessary scope (#1126)
Reformat code using clang-format. Signed-off-by: Marco Antognini <marco.antognini@arm.com>
This commit is contained in:
@@ -504,8 +504,6 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
&& (q[j] & 0x7fffffff) > 0x7f800000 && t2[j] == q2[j])
|
&& (q[j] & 0x7fffffff) > 0x7f800000 && t2[j] == q2[j])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// if( t[j] != q[j] || t2[j] != q2[j] )
|
|
||||||
{
|
|
||||||
float test = ((float *)q)[j];
|
float test = ((float *)q)[j];
|
||||||
int correct2 = INT_MIN;
|
int correct2 = INT_MIN;
|
||||||
double correct = f->func.f_ffpI(s[j], s2[j], &correct2);
|
double correct = f->func.f_ffpI(s[j], s2[j], &correct2);
|
||||||
@@ -524,8 +522,7 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
// then the standard either neglects to say what is returned
|
// then the standard either neglects to say what is returned
|
||||||
// in iptr or leaves it undefined or implementation defined.
|
// in iptr or leaves it undefined or implementation defined.
|
||||||
int iptrUndefined = fabs(((float *)gIn)[j]) == INFINITY
|
int iptrUndefined = fabs(((float *)gIn)[j]) == INFINITY
|
||||||
|| ((float *)gIn2)[j] == 0.0f
|
|| ((float *)gIn2)[j] == 0.0f || isnan(((float *)gIn2)[j])
|
||||||
|| isnan(((float *)gIn2)[j])
|
|
||||||
|| isnan(((float *)gIn)[j]);
|
|| isnan(((float *)gIn)[j]);
|
||||||
if (iptrUndefined) iErr = 0;
|
if (iptrUndefined) iErr = 0;
|
||||||
|
|
||||||
@@ -549,10 +546,8 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
f->func.f_ffpI(-0.0, s2[j], &correct4i);
|
f->func.f_ffpI(-0.0, s2[j], &correct4i);
|
||||||
float err2 = Ulp_Error(test, correct3);
|
float err2 = Ulp_Error(test, correct3);
|
||||||
float err3 = Ulp_Error(test, correct4);
|
float err3 = Ulp_Error(test, correct4);
|
||||||
int64_t iErr3 =
|
int64_t iErr3 = (long long)q2[j] - (long long)correct3i;
|
||||||
(long long)q2[j] - (long long)correct3i;
|
int64_t iErr4 = (long long)q2[j] - (long long)correct4i;
|
||||||
int64_t iErr4 =
|
|
||||||
(long long)q2[j] - (long long)correct4i;
|
|
||||||
fail = fail
|
fail = fail
|
||||||
&& ((!(fabsf(err2) <= float_ulps && iErr3 == 0))
|
&& ((!(fabsf(err2) <= float_ulps && iErr3 == 0))
|
||||||
&& (!(fabsf(err3) <= float_ulps
|
&& (!(fabsf(err3) <= float_ulps
|
||||||
@@ -577,8 +572,7 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
{
|
{
|
||||||
int correct7i, correct8i;
|
int correct7i, correct8i;
|
||||||
correct3 = f->func.f_ffpI(0.0, 0.0, &correct3i);
|
correct3 = f->func.f_ffpI(0.0, 0.0, &correct3i);
|
||||||
correct4 =
|
correct4 = f->func.f_ffpI(-0.0, 0.0, &correct4i);
|
||||||
f->func.f_ffpI(-0.0, 0.0, &correct4i);
|
|
||||||
double correct7 =
|
double correct7 =
|
||||||
f->func.f_ffpI(0.0, -0.0, &correct7i);
|
f->func.f_ffpI(0.0, -0.0, &correct7i);
|
||||||
double correct8 =
|
double correct8 =
|
||||||
@@ -594,8 +588,7 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
int64_t iErr8 =
|
int64_t iErr8 =
|
||||||
(long long)q2[j] - (long long)correct8i;
|
(long long)q2[j] - (long long)correct8i;
|
||||||
fail = fail
|
fail = fail
|
||||||
&& ((!(fabsf(err2) <= float_ulps
|
&& ((!(fabsf(err2) <= float_ulps && iErr3 == 0))
|
||||||
&& iErr3 == 0))
|
|
||||||
&& (!(fabsf(err3) <= float_ulps
|
&& (!(fabsf(err3) <= float_ulps
|
||||||
&& iErr4 == 0))
|
&& iErr4 == 0))
|
||||||
&& (!(fabsf(err4) <= float_ulps
|
&& (!(fabsf(err4) <= float_ulps
|
||||||
@@ -613,12 +606,9 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
|
|
||||||
// retry per section 6.5.3.4
|
// retry per section 6.5.3.4
|
||||||
if (IsFloatResultSubnormal(correct3, float_ulps)
|
if (IsFloatResultSubnormal(correct3, float_ulps)
|
||||||
|| IsFloatResultSubnormal(correct4,
|
|| IsFloatResultSubnormal(correct4, float_ulps)
|
||||||
float_ulps)
|
|| IsFloatResultSubnormal(correct7, float_ulps)
|
||||||
|| IsFloatResultSubnormal(correct7,
|
|| IsFloatResultSubnormal(correct8, float_ulps))
|
||||||
float_ulps)
|
|
||||||
|| IsFloatResultSubnormal(correct8,
|
|
||||||
float_ulps))
|
|
||||||
{
|
{
|
||||||
fail = fail
|
fail = fail
|
||||||
&& !(test == 0.0f
|
&& !(test == 0.0f
|
||||||
@@ -631,16 +621,13 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
else if (IsFloatSubnormal(s2[j]))
|
else if (IsFloatSubnormal(s2[j]))
|
||||||
{
|
{
|
||||||
int correct3i, correct4i;
|
int correct3i, correct4i;
|
||||||
double correct3 =
|
double correct3 = f->func.f_ffpI(s[j], 0.0, &correct3i);
|
||||||
f->func.f_ffpI(s[j], 0.0, &correct3i);
|
|
||||||
double correct4 =
|
double correct4 =
|
||||||
f->func.f_ffpI(s[j], -0.0, &correct4i);
|
f->func.f_ffpI(s[j], -0.0, &correct4i);
|
||||||
float err2 = Ulp_Error(test, correct3);
|
float err2 = Ulp_Error(test, correct3);
|
||||||
float err3 = Ulp_Error(test, correct4);
|
float err3 = Ulp_Error(test, correct4);
|
||||||
int64_t iErr3 =
|
int64_t iErr3 = (long long)q2[j] - (long long)correct3i;
|
||||||
(long long)q2[j] - (long long)correct3i;
|
int64_t iErr4 = (long long)q2[j] - (long long)correct4i;
|
||||||
int64_t iErr4 =
|
|
||||||
(long long)q2[j] - (long long)correct4i;
|
|
||||||
fail = fail
|
fail = fail
|
||||||
&& ((!(fabsf(err2) <= float_ulps && iErr3 == 0))
|
&& ((!(fabsf(err2) <= float_ulps && iErr3 == 0))
|
||||||
&& (!(fabsf(err3) <= float_ulps
|
&& (!(fabsf(err3) <= float_ulps
|
||||||
@@ -689,7 +676,6 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (0 == (i & 0x0fffffff))
|
if (0 == (i & 0x0fffffff))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user