diff options
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/device/device_cpu.cpp | 3 | ||||
-rw-r--r-- | intern/cycles/util/util_task.cpp | 6 | ||||
-rw-r--r-- | intern/cycles/util/util_task.h | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index 95df2e21608..7bc84878dab 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -307,8 +307,7 @@ public: void task_add(DeviceTask& task) { - /* split task into smaller ones, more than number of threads for uneven - * workloads where some parts of the image render slower than others */ + /* split task into smaller ones */ list<DeviceTask> tasks; task.split(tasks, TaskScheduler::num_threads()); diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp index abcb05561bd..07960805f77 100644 --- a/intern/cycles/util/util_task.cpp +++ b/intern/cycles/util/util_task.cpp @@ -186,12 +186,12 @@ void TaskScheduler::init(int num_threads) do_exit = false; if(num_threads == 0) { - /* automatic number of threads will be main thread + num cores */ + /* automatic number of threads */ num_threads = system_cpu_thread_count(); } else { - /* main thread will also work, for fixed threads we count it too */ - num_threads -= 1; + /* manual number of threads */ + num_threads; } /* launch threads that will be waiting for work */ diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h index 5bca3f255af..6e002ddd5b1 100644 --- a/intern/cycles/util/util_task.h +++ b/intern/cycles/util/util_task.h @@ -94,8 +94,8 @@ public: static void init(int num_threads = 0); static void exit(); - /* number of threads that can work on tasks, main thread counts too */ - static int num_threads() { return threads.size() + 1; } + /* number of threads that can work on task */ + static int num_threads() { return threads.size(); } /* test if any session is using the scheduler */ static bool active() { return users != 0; } |