diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-20 13:55:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-20 13:55:48 +0300 |
commit | 254fbcdd7b638943acc033c081ca729954f2b5a0 (patch) | |
tree | bf95675a8870cfaadedfc5da1bab733e1c915f44 /intern/cycles/util | |
parent | ff1b850081b067ea0b989bdc62c2d85f36e23524 (diff) |
Cycles: Fix compilation error on with older GCC
Hopefully it works on all platforms now.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_math.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index d0062646414..2b81c8c498a 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -22,6 +22,11 @@ * Basic math functions on scalar and vector types. This header is used by * both the kernel code when compiled as C++, and other C++ non-kernel code. */ +#ifndef __KERNEL_GPU__ +# include <cmath> +#endif + + #ifndef __KERNEL_OPENCL__ #include <float.h> @@ -97,6 +102,9 @@ ccl_device_inline float fminf(float a, float b) #ifndef __KERNEL_GPU__ +using std::isfinite; +using std::isnan; + ccl_device_inline int abs(int x) { return (x > 0)? x: -x; |