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_float3_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_float3_impl.h')
-rw-r--r--intern/cycles/util/util_types_float3_impl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/util/util_types_float3_impl.h b/intern/cycles/util/util_types_float3_impl.h
index f062d970b26..45f61767d3f 100644
--- a/intern/cycles/util/util_types_float3_impl.h
+++ b/intern/cycles/util/util_types_float3_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__
@@ -89,6 +93,11 @@ ccl_device_inline float3 make_float3(float x, float y, float z)
#endif
return a;
}
+
+ccl_device_inline void print_float3(const char *label, const float3& a)
+{
+ printf("%s: %.8f %.8f %.8f\n", label, (double)a.x, (double)a.y, (double)a.z);
+}
#endif /* __KERNEL_GPU__ */
CCL_NAMESPACE_END