diff --git a/CMakeLists.txt b/CMakeLists.txt index 2577345e..08f2b544 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index 3a340e30..843543a1 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -809,8 +809,15 @@ namespace detail { GLM_STATIC_ASSERT(detail::type::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 diff --git a/test/core/core_func_common.cpp b/test/core/core_func_common.cpp index de240888..53eda770 100644 --- a/test/core/core_func_common.cpp +++ b/test/core/core_func_common.cpp @@ -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; }