Skip to content

Commit

Permalink
Removed redundant condition for logging mix verification
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Jun 14, 2023
1 parent 2c25254 commit 84f189a
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions test_conformance/commonfns/test_mix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,9 @@ int verify_mix(const T *const inptrX, const T *const inptrY,
{
if (delta > MAX_ERR)
{
if (std::is_same<T, half>::value)
log_error(
"%d) verification error: mix(%a, %a, %a) = *%a "
"vs. %a\n",
i, conv_to_flt(inptrX[i]), conv_to_flt(inptrY[i]),
conv_to_flt(inptrA[i]), r, conv_to_flt(outptr[i]));
else
log_error(
"%d) verification error: mix(%a, %a, %a) = *%a "
"vs. %a\n",
i, inptrX[i], inptrY[i], inptrA[i], r, outptr[i]);
log_error("%d) verification error: mix(%a, %a, %a) = *%a "
"vs. %a\n",
i, inptrX[i], inptrY[i], inptrA[i], r, outptr[i]);
return -1;
}
}
Expand All @@ -117,19 +109,11 @@ int verify_mix(const T *const inptrX, const T *const inptrY,
{
if (delta > MAX_ERR)
{
if (std::is_same<T, half>::value)
log_error(
"{%d, element %d}) verification error: mix(%a, "
"%a, %a) = *%a vs. %a\n",
ii, j, conv_to_flt(inptrX[vi]),
conv_to_flt(inptrY[vi]), conv_to_flt(inptrA[i]),
r, conv_to_flt(outptr[vi]));
else
log_error(
"{%d, element %d}) verification error: mix(%a, "
"%a, %a) = *%a vs. %a\n",
ii, j, inptrX[vi], inptrY[vi], inptrA[i], r,
outptr[vi]);
log_error(
"{%d, element %d}) verification error: mix(%a, "
"%a, %a) = *%a vs. %a\n",
ii, j, inptrX[vi], inptrY[vi], inptrA[i], r,
outptr[vi]);
return -1;
}
}
Expand Down

0 comments on commit 84f189a

Please sign in to comment.