diff options
author | Werner, Stefan <stefan.werner@intel.com> | 2022-10-13 10:44:07 +0300 |
---|---|---|
committer | Werner, Stefan <stefan.werner@intel.com> | 2022-10-13 10:45:53 +0300 |
commit | c32a4556052b1a55a48be581a41621115f14f8b7 (patch) | |
tree | ba794a5811443888f0cefb3af20086c3089f4c2b /intern/cycles/device | |
parent | fabf4ee33def3b8f3555072ffa1d497ac8355da1 (diff) |
Cleanup: Fixed some warnings
Some unused parameters were left after changing the oneAPI device code
to be a direclty linked shared library.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r-- | intern/cycles/device/oneapi/device_impl.cpp | 9 | ||||
-rw-r--r-- | intern/cycles/device/oneapi/device_impl.h | 2 |
2 files changed, 8 insertions, 3 deletions
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, |