Cleanup: Cycles: Use default initializers in oneAPI device

Ref #140457
This commit is contained in:
Brecht Van Lommel
2025-06-16 15:39:22 +02:00
parent 941d2ac1e1
commit f7ffcfe652
2 changed files with 8 additions and 16 deletions

View File

@@ -46,15 +46,7 @@ static void queue_error_cb(const char *message, void *user_ptr)
}
OneapiDevice::OneapiDevice(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
: GPUDevice(info, stats, profiler, headless),
device_queue_(nullptr),
# ifdef WITH_EMBREE_GPU
embree_device(nullptr),
embree_scene(nullptr),
# endif
kg_memory_(nullptr),
kg_memory_device_(nullptr),
kg_memory_size_(0)
: GPUDevice(info, stats, profiler, headless)
{
/* Verify that base class types can be used with specific backend types */
static_assert(sizeof(texMemObject) ==

View File

@@ -20,10 +20,10 @@ using OneAPIDeviceIteratorCallback =
class OneapiDevice : public GPUDevice {
private:
SyclQueue *device_queue_;
SyclQueue *device_queue_ = nullptr;
# ifdef WITH_EMBREE_GPU
RTCDevice embree_device;
RTCScene embree_scene;
RTCDevice embree_device = nullptr;
RTCScene embree_scene = nullptr;
# if RTC_VERSION >= 40302
thread_mutex scene_data_mutex;
vector<RTCScene> all_embree_scenes;
@@ -31,10 +31,10 @@ class OneapiDevice : public GPUDevice {
# endif
using ConstMemMap = map<string, unique_ptr<device_vector<uchar>>>;
ConstMemMap const_mem_map_;
void *kg_memory_;
void *kg_memory_device_;
size_t kg_memory_size_ = (size_t)0;
size_t max_memory_on_device_ = (size_t)0;
void *kg_memory_ = nullptr;
void *kg_memory_device_ = nullptr;
size_t kg_memory_size_ = 0;
size_t max_memory_on_device_ = 0;
std::string oneapi_error_string_;
bool use_hardware_raytracing = false;
unsigned int kernel_features = 0;