Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/device/device_cpu.cpp')
-rw-r--r--intern/cycles/device/device_cpu.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 096cb83552a..d2914bd519c 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -540,16 +540,6 @@ class CPUDevice : public Device {
thread_denoise(task);
}
- class CPUDeviceTask : public Task {
- public:
- CPUDeviceTask(CPUDevice *device, DeviceTask &task) : task(task)
- {
- run = function_bind(&CPUDevice::thread_run, device, task);
- }
-
- DeviceTask task;
- };
-
bool denoising_non_local_means(device_ptr image_ptr,
device_ptr guide_ptr,
device_ptr variance_ptr,
@@ -1163,8 +1153,12 @@ class CPUDevice : public Device {
else
task.split(tasks, info.cpu_threads);
- foreach (DeviceTask &task, tasks)
- task_pool.push(new CPUDeviceTask(this, task));
+ foreach (DeviceTask &task, tasks) {
+ task_pool.push([=] {
+ DeviceTask task_copy = task;
+ thread_run(task_copy);
+ });
+ }
}
void task_wait()