Commit: 412642865d1c5eaf271bdb769da4e377ae52094c
Author: Nikita Sirgienko
Date:   Thu Nov 24 18:05:02 2022 +0100
Branches: master
https://developer.blender.org/rB412642865d1c5eaf271bdb769da4e377ae52094c

Cleanup: Resolve a warning for the ambiguity on the parenthesis in oneAPI code

No functional changes.

===================================================================

M       intern/cycles/device/oneapi/device_impl.cpp

===================================================================

diff --git a/intern/cycles/device/oneapi/device_impl.cpp 
b/intern/cycles/device/oneapi/device_impl.cpp
index d0ddd69289c..bf8de8b5a12 100644
--- a/intern/cycles/device/oneapi/device_impl.cpp
+++ b/intern/cycles/device/oneapi/device_impl.cpp
@@ -430,9 +430,9 @@ void OneapiDevice::check_usm(SyclQueue *queue_, const void 
*usm_ptr, bool allow_
   sycl::usm::alloc usm_type = get_pointer_type(usm_ptr, queue->get_context());
   (void)usm_type;
   assert(usm_type == sycl::usm::alloc::device ||
-         ((device_type == sycl::info::device_type::cpu || allow_host) &&
-              usm_type == sycl::usm::alloc::host ||
-          usm_type == sycl::usm::alloc::unknown));
+         (usm_type == sycl::usm::alloc::host &&
+          (allow_host || device_type == sycl::info::device_type::cpu)) ||
+         usm_type == sycl::usm::alloc::unknown);
 #  else
   /* Silence warning about unused arguments. */
   (void)queue_;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to