diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-19 17:47:53 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-19 17:48:42 +0300 |
commit | fa91b43e8cbe55179bfb783be4371e8bc50e9d74 (patch) | |
tree | 7dfbfb949335236e36111bb9facdb9cc504ec978 /intern/cycles/util/util_debug.h | |
parent | edf053ff635e782d09b64d205fadfca3cce79de4 (diff) |
Cycles: Make it more proper check on vectorization flags from DebugFlags
Mimics to checks in system_cpu_support() checks.
Diffstat (limited to 'intern/cycles/util/util_debug.h')
-rw-r--r-- | intern/cycles/util/util_debug.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h index 632c6ae35e7..ec38cd373ba 100644 --- a/intern/cycles/util/util_debug.h +++ b/intern/cycles/util/util_debug.h @@ -45,6 +45,15 @@ public: bool sse3; bool sse2; + /* Check functions to see whether instructions up to the given one + * are allowed for use. + */ + bool has_avx2() { return has_avx() && avx2; } + bool has_avx() { return has_sse41() && avx; } + bool has_sse41() { return has_sse3() && sse41; } + bool has_sse3() { return has_sse2() && sse3; } + bool has_sse2() { return sse2; } + /* Whether QBVH usage is allowed or not. */ bool qbvh; |