diff options
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r-- | intern/cycles/device/device.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index 2ee2e044618..9840687b76a 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -25,6 +25,7 @@ #include "device_task.h" #include "util_list.h" +#include "util_stats.h" #include "util_string.h" #include "util_thread.h" #include "util_types.h" @@ -72,7 +73,7 @@ public: class Device { protected: - Device() {} + Device(Stats &stats_) : stats(stats_) {} bool background; string error_msg; @@ -84,6 +85,9 @@ public: DeviceInfo info; virtual const string& error_message() { return error_msg; } + /* statistics */ + Stats &stats; + /* regular memory */ virtual void mem_alloc(device_memory& mem, MemoryType type) = 0; virtual void mem_copy_to(device_memory& mem) = 0; @@ -130,7 +134,7 @@ public: virtual int device_number(Device *sub_device) { return 0; } /* static */ - static Device *create(DeviceInfo& info, bool background = true, int threads = 0); + static Device *create(DeviceInfo& info, Stats &stats, bool background = true); static DeviceType type_from_string(const char *name); static string string_from_type(DeviceType type); |