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-04-14 15:05:23 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-25 11:33:26 +0300
commit0a07cdbe80b2999478fa0d062a846e9bcfafc872 (patch)
tree13cff31f7b4fa58cafc447bb68eaaf4b63d69cc7 /intern/cycles/util/util_types_float2_impl.h
parent51ec9441b74ccd02e5555b9385c3b2531f7411a6 (diff)
Cycles: Split vectorized math utilities to a dedicated files
This file was even a bigger mess than vectorized types header, cleaning it up to make it easier to maintain this files and extend further.
Diffstat (limited to 'intern/cycles/util/util_types_float2_impl.h')
-rw-r--r--intern/cycles/util/util_types_float2_impl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/util/util_types_float2_impl.h b/intern/cycles/util/util_types_float2_impl.h
index 7ef390d7da4..782dda195eb 100644
--- a/intern/cycles/util/util_types_float2_impl.h
+++ b/intern/cycles/util/util_types_float2_impl.h
@@ -21,6 +21,10 @@
# error "Do not include this file directly, include util_types.h instead."
#endif
+#ifndef __KERNEL_GPU__
+# include <cstdio>
+#endif
+
CCL_NAMESPACE_BEGIN
#ifndef __KERNEL_GPU__
@@ -43,6 +47,11 @@ ccl_device_inline float2 make_float2(float x, float y)
float2 a = {x, y};
return a;
}
+
+ccl_device_inline void print_float2(const char *label, const float2& a)
+{
+ printf("%s: %.8f %.8f\n", label, (double)a.x, (double)a.y);
+}
#endif /* __KERNEL_GPU__ */
CCL_NAMESPACE_END