Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-08 15:34:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-08-08 16:27:25 +0300
commitfd397a7d28666f1c3ee9cd85de5760825d62d28e (patch)
tree87d232e1d575e0f47b87a9bb9b9fd08886e9d562 /intern/cycles/util
parent01ee88563b64e8f381bbbe9f54894ad27541f050 (diff)
Cycles: Add utility macro ccl_ref
It is defined to & for CPU side compilation, and defined to an empty for any GPU platform. The idea here is to use this macro instead of #ifdef block with bunch of duplicated lines just to make it so CPU code is efficient. Eventually we might switch to references on CUDA as well, but that would require some intensive testing.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_defines.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/cycles/util/util_defines.h b/intern/cycles/util/util_defines.h
index d0d87e74332..ae654092c87 100644
--- a/intern/cycles/util/util_defines.h
+++ b/intern/cycles/util/util_defines.h
@@ -35,6 +35,7 @@
# define ccl_local_param
# define ccl_private
# define ccl_restrict __restrict
+# define ccl_ref &
# define __KERNEL_WITH_SSE_ALIGN__
# if defined(_WIN32) && !defined(FREE_WINDOWS)