From 115c7fc64ace8d9742872863f3f6bc889e9d6835 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 7 Jan 2013 23:24:27 +0000 Subject: [PATCH] Added specific code path to isnan and isinf for CUDA, issue #35 --- glm/core/func_common.inl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index 9c1c0470..2e2d31c5 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -811,6 +811,8 @@ namespace detail # else return std::isnan(x); # endif +# elif(GLM_COMPILER & GLM_COMPILER_CUDA) + return isnan(x) != 0; # else return std::isnan(x); # endif @@ -866,6 +868,9 @@ namespace detail # else return std::isinf(x); # endif +# elif(GLM_COMPILER & GLM_COMPILER_CUDA) + // http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab + return isinf(double(x)) != 0; # else return std::isinf(x); # endif