mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Fixed isnan for Intel compiler
This commit is contained in:
parent
b1ecabdd28
commit
b012c80771
@ -40,6 +40,8 @@ elseif(NOT GLM_TEST_ENABLE_MS_EXTENSIONS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#set(GLM_SIMD_INSTRUCTION_SET "" CACHE STRING "Instruction set. Possible values are SSE1, SSE2")
|
||||
|
||||
option(GLM_TEST_ENABLE_SIMD "Enable SIMD optimizations" OFF)
|
||||
if(GLM_TEST_ENABLE_SIMD)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -809,8 +809,15 @@ namespace detail
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isnan' only accept floating-point inputs");
|
||||
|
||||
# if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
|
||||
return _isnan(x) != 0;
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isnan(x) != 0;
|
||||
# else
|
||||
return std::isnan(x);
|
||||
# endif
|
||||
/*
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isnan(x) != 0;
|
||||
@ -818,7 +825,8 @@ namespace detail
|
||||
return std::isnan(x);
|
||||
# endif
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_INTEL)
|
||||
return isnan(x) != 0;
|
||||
return _isnan(x) != 0;
|
||||
*/
|
||||
# else
|
||||
return std::isnan(x);
|
||||
# endif
|
||||
|
@ -364,14 +364,14 @@ int test_isnan()
|
||||
Error += true == glm::any(glm::isnan(glm::dvec3(0.0 / Zero_d))) ? 0 : 1;
|
||||
Error += true == glm::any(glm::isnan(glm::dvec4(0.0 / Zero_d))) ? 0 : 1;
|
||||
}
|
||||
/*
|
||||
|
||||
{
|
||||
Error += true == glm::isnan(0.0f/Zero_f) ? 0 : 1;
|
||||
Error += true == glm::any(glm::isnan(glm::vec2(0.0f/Zero_f))) ? 0 : 1;
|
||||
Error += true == glm::any(glm::isnan(glm::vec3(0.0f/Zero_f))) ? 0 : 1;
|
||||
Error += true == glm::any(glm::isnan(glm::vec4(0.0f/Zero_f))) ? 0 : 1;
|
||||
}
|
||||
*/
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user