diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-10 22:11:04 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-10 22:11:04 +0300 |
commit | 5646a9f759f306d7c98bb240b24e88afa9e187d9 (patch) | |
tree | 6e695804f28aaea2b342bed5a619129e598490dd /intern | |
parent | 4e37b296317eb00774973e1ce60ea7dd3004dccc (diff) |
Cycles: Add utility functions to print ssef, ssei and sseb
Nothing special, just really handy for debugging.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/util/util_sseb.h | 6 | ||||
-rw-r--r-- | intern/cycles/util/util_ssef.h | 10 | ||||
-rw-r--r-- | intern/cycles/util/util_ssei.h | 6 |
3 files changed, 22 insertions, 0 deletions
diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h index 4e1d1b39f3a..b517dc95adc 100644 --- a/intern/cycles/util/util_sseb.h +++ b/intern/cycles/util/util_sseb.h @@ -155,6 +155,12 @@ __forceinline size_t movemask( const sseb& a ) { return _mm_movemask_ps(a); } #endif +ccl_device_inline void print_sseb(const char *label, const sseb &a) +{ + printf("%s: %df %df %df %d\n", + label, a[0], a[1], a[2], a[3]); +} + CCL_NAMESPACE_END #endif diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h index 073f2c69dbf..dfbc8416b96 100644 --- a/intern/cycles/util/util_ssef.h +++ b/intern/cycles/util/util_ssef.h @@ -582,6 +582,16 @@ ccl_device_inline const ssef set_sign_bit(const ssef &a) #endif +ccl_device_inline void print_ssef(const char *label, const ssef &a) +{ + printf("%s: %.8f %.8f %.8f %.8f\n", + label, + (double)a[0], + (double)a[1], + (double)a[2], + (double)a[3]); +} + CCL_NAMESPACE_END #endif diff --git a/intern/cycles/util/util_ssei.h b/intern/cycles/util/util_ssei.h index 0539425ac9e..45d2542acce 100644 --- a/intern/cycles/util/util_ssei.h +++ b/intern/cycles/util/util_ssei.h @@ -288,6 +288,12 @@ __forceinline void store4i_nt(void* ptr, const ssei& v) { #endif +ccl_device_inline void print_ssei(const char *label, const ssei &a) +{ + printf("%s: %df %df %df %d\n", + label, a[0], a[1], a[2], a[3]); +} + CCL_NAMESPACE_END #endif |