Skip to content

Commit

Permalink
Check format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshmih committed Oct 12, 2023
1 parent cc6389b commit 9ad151a
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test_conformance/basic/test_explicit_s2v.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,22 @@ int test_explicit_s2v_function(cl_context context, cl_command_queue queue,
{
if( memcmp( convertedData, outPtr + destTypeSize * s, destTypeSize ) != 0 )
{
bool isSrcNaN = (((srcType == kHalf) && IsHalfNaN(*reinterpret_cast<cl_half *>(inPtr)))
|| ((srcType == kFloat) && isnan(*reinterpret_cast<cl_float *>(inPtr)))
|| ((srcType == kDouble) && isnan(*reinterpret_cast<cl_double *>(inPtr))));
bool isDestNaN = (((destType == kHalf) && IsHalfNaN(*reinterpret_cast<cl_half *>(outPtr + destTypeSize * s)))
|| ((destType == kFloat) && isnan(*reinterpret_cast<cl_float *>(outPtr + destTypeSize * s)))
|| ((destType == kDouble) && isnan(*reinterpret_cast<cl_double *>(outPtr + destTypeSize * s))));
bool isSrcNaN =
(((srcType == kHalf)
&& IsHalfNaN(*reinterpret_cast<cl_half *>(inPtr)))
|| ((srcType == kFloat)
&& isnan(*reinterpret_cast<cl_float *>(inPtr)))
|| ((srcType == kDouble)
&& isnan(*reinterpret_cast<cl_double *>(inPtr))));
bool isDestNaN = (((destType == kHalf)
&& IsHalfNaN(*reinterpret_cast<cl_half *>(
outPtr + destTypeSize * s)))
|| ((destType == kFloat)
&& isnan(*reinterpret_cast<cl_float *>(
outPtr + destTypeSize * s)))
|| ((destType == kDouble)
&& isnan(*reinterpret_cast<cl_double *>(
outPtr + destTypeSize * s))));

if (isSrcNaN && isDestNaN)
{
Expand Down

0 comments on commit 9ad151a

Please sign in to comment.