diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-14 15:05:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-25 11:33:26 +0300 |
commit | 0a07cdbe80b2999478fa0d062a846e9bcfafc872 (patch) | |
tree | 13cff31f7b4fa58cafc447bb68eaaf4b63d69cc7 /intern/cycles/util/util_types_int4_impl.h | |
parent | 51ec9441b74ccd02e5555b9385c3b2531f7411a6 (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_int4_impl.h')
-rw-r--r-- | intern/cycles/util/util_types_int4_impl.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/util/util_types_int4_impl.h b/intern/cycles/util/util_types_int4_impl.h index 52cda1c74b5..07cdc88f2dc 100644 --- a/intern/cycles/util/util_types_int4_impl.h +++ b/intern/cycles/util/util_types_int4_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__ @@ -99,6 +103,11 @@ ccl_device_inline int4 make_int4(const float3& f) #endif return a; } + +ccl_device_inline void print_int4(const char *label, const int4& a) +{ + printf("%s: %d %d %d %d\n", label, a.x, a.y, a.z, a.w); +} #endif /* __KERNEL_GPU__ */ CCL_NAMESPACE_END |