mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix 'fpclassify: ambiguous call' compile fail in MSVC 2022 (#2426)
Similar to #2219, we see "'fpclassify': ambiguous call" error in test_conformance\basic\test_fpmath.cpp due to missing constexpr at https://github.com/KhronosGroup/OpenCL-CTS/blob/9265cbb2c274/test_conformance/basic/test_fpmath.cpp#L104 This PR fixes the issue by moving utility function isnan_fp in testHarness.h and use it. Note this PR doesn't modify use of isnan in many tests where only float/double values are checked.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
#include "harness/mathHelpers.h"
|
||||
#include "harness/stringHelpers.h"
|
||||
|
||||
#include <CL/cl_half.h>
|
||||
@@ -368,9 +369,8 @@ int RelationalsFPTest::test_equiv_kernel(unsigned int vecSize,
|
||||
{
|
||||
if (gInfNanSupport == 0)
|
||||
{
|
||||
float a = inDataA[i * vecSize + j];
|
||||
float b = inDataB[i * vecSize + j];
|
||||
if (isnan(a) || isnan(b))
|
||||
if (isnan_fp(inDataA[i * vecSize + j])
|
||||
|| isnan_fp(inDataB[i * vecSize + j]))
|
||||
fail = 0;
|
||||
else
|
||||
fail = 1;
|
||||
|
||||
Reference in New Issue
Block a user