[Bf-blender-cvs] [c32a4556052] master: Cleanup: Fixed some warnings

Werner, Stefan noreply at git.blender.org
Thu Oct 13 09:46:54 CEST 2022


Commit: c32a4556052b1a55a48be581a41621115f14f8b7
Author: Werner, Stefan
Date:   Thu Oct 13 09:44:07 2022 +0200
Branches: master
https://developer.blender.org/rBc32a4556052b1a55a48be581a41621115f14f8b7

Cleanup: Fixed some warnings

Some unused parameters were left after changing the oneAPI device code
to be a direclty linked shared library.

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

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

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

diff --git a/intern/cycles/device/oneapi/device_impl.cpp b/intern/cycles/device/oneapi/device_impl.cpp
index 4e2d4b5fe17..91f53fd1eae 100644
--- a/intern/cycles/device/oneapi/device_impl.cpp
+++ b/intern/cycles/device/oneapi/device_impl.cpp
@@ -43,7 +43,7 @@ OneapiDevice::OneapiDevice(const DeviceInfo &info, Stats &stats, Profiler &profi
   }
 
   size_t globals_segment_size;
-  is_finished_ok = kernel_globals_size(device_queue_, globals_segment_size);
+  is_finished_ok = kernel_globals_size(globals_segment_size);
   if (is_finished_ok == false) {
     set_error("oneAPI constant memory initialization got runtime exception \"" +
               oneapi_error_string_ + "\"");
@@ -433,6 +433,11 @@ void OneapiDevice::check_usm(SyclQueue *queue_, const void *usm_ptr, bool allow_
          ((device_type == sycl::info::device_type::host ||
            device_type == sycl::info::device_type::cpu || allow_host) &&
           usm_type == sycl::usm::alloc::host));
+#  else
+  /* Silence warning about unused arguments. */
+  (void)queue_;
+  (void)usm_ptr;
+  (void)allow_host;
 #  endif
 }
 
@@ -560,7 +565,7 @@ bool OneapiDevice::queue_synchronize(SyclQueue *queue_)
   }
 }
 
-bool OneapiDevice::kernel_globals_size(SyclQueue *queue_, size_t &kernel_global_size)
+bool OneapiDevice::kernel_globals_size(size_t &kernel_global_size)
 {
   kernel_global_size = sizeof(KernelGlobalsGPU);
 
diff --git a/intern/cycles/device/oneapi/device_impl.h b/intern/cycles/device/oneapi/device_impl.h
index 3589e881a6e..62034150eac 100644
--- a/intern/cycles/device/oneapi/device_impl.h
+++ b/intern/cycles/device/oneapi/device_impl.h
@@ -104,7 +104,7 @@ class OneapiDevice : public Device {
   int get_num_multiprocessors();
   int get_max_num_threads_per_multiprocessor();
   bool queue_synchronize(SyclQueue *queue);
-  bool kernel_globals_size(SyclQueue *queue, size_t &kernel_global_size);
+  bool kernel_globals_size(size_t &kernel_global_size);
   void set_global_memory(SyclQueue *queue,
                          void *kernel_globals,
                          const char *memory_name,



More information about the Bf-blender-cvs mailing list