Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/device_multi.cpp
| Show First 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | foreach(SubDevice& sub, devices) { | ||||
| i++; | i++; | ||||
| } | } | ||||
| return -1; | return -1; | ||||
| } | } | ||||
| int get_split_task_count(DeviceTask& task) | int get_split_task_count(DeviceTask& task) | ||||
| { | { | ||||
| return 1; | int total_tasks = 0; | ||||
| list<DeviceTask> tasks; | |||||
| task.split(tasks, devices.size()); | |||||
| foreach(SubDevice& sub, devices) { | |||||
| if(!tasks.empty()) { | |||||
| DeviceTask subtask = tasks.front(); | |||||
| tasks.pop_front(); | |||||
| total_tasks += sub.device->get_split_task_count(subtask); | |||||
| } | |||||
| } | |||||
| return total_tasks; | |||||
| } | } | ||||
| void task_add(DeviceTask& task) | void task_add(DeviceTask& task) | ||||
| { | { | ||||
| list<DeviceTask> tasks; | list<DeviceTask> tasks; | ||||
| task.split(tasks, devices.size()); | task.split(tasks, devices.size()); | ||||
| foreach(SubDevice& sub, devices) { | foreach(SubDevice& sub, devices) { | ||||
| ▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines | |||||