From 0a07cdbe80b2999478fa0d062a846e9bcfafc872 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 14 Apr 2017 14:05:23 +0200 Subject: 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. --- intern/cycles/util/util_types_float3_impl.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'intern/cycles/util/util_types_float3_impl.h') 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 +#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 -- cgit v1.2.3