Cycles: Fix compilation error on with older GCC

Hopefully it works on all platforms now.
This commit is contained in:
Sergey Sharybin 2017-01-20 11:55:48 +01:00
parent ff1b850081
commit 254fbcdd7b
1 changed files with 8 additions and 0 deletions

View File

@ -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;