diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-12 21:07:12 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-25 15:08:32 +0400 |
commit | b3d414cc216222e115924aa4d6b4ecf43f459d78 (patch) | |
tree | fd4537c2240a8ad57149ad871f42bd3e54c79f9e /intern | |
parent | 13d8671a1a71e77ca3c6b1ce3d13d200ddd778d1 (diff) |
Cycles: Don't inline functions for debug CPU kernel
Nobody will use debug mode for benchmarks anyway and this way it's much easier
to set breakpoints on inlined functions to catch all their usages.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/util/util_types.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h index d7d80e2cffd..7b7e04ca941 100644 --- a/intern/cycles/util/util_types.h +++ b/intern/cycles/util/util_types.h @@ -33,7 +33,11 @@ #ifndef __KERNEL_GPU__ -#define ccl_device static inline +# ifndef NDEBUG +# define ccl_device static inline +# else +# define ccl_device static +# endif #define ccl_device_noinline static #define ccl_global #define ccl_constant @@ -41,7 +45,11 @@ #if defined(_WIN32) && !defined(FREE_WINDOWS) -#define ccl_device_inline static __forceinline +# ifndef NDEBUG +# define ccl_device_inline static __forceinline +# else +# define ccl_device_inline static +# endif #define ccl_align(...) __declspec(align(__VA_ARGS__)) #ifdef __KERNEL_64_BIT__ #define ccl_try_align(...) __declspec(align(__VA_ARGS__)) @@ -50,7 +58,11 @@ #define ccl_try_align(...) /* not support for function arguments (error C2719) */ #endif #define ccl_may_alias -#define ccl_always_inline __forceinline +# ifndef NDEBUG +# define ccl_always_inline __forceinline +# else +# define ccl_always_inline +# endif #define ccl_maybe_unused #else |