[x265] [PATCH] threadpool: utilize all processors on embedded ARM platforms

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Tue Feb 9 11:27:09 CET 2016


# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1455010589 -19800
#      Tue Feb 09 15:06:29 2016 +0530
# Node ID 18b83aaee1b56e2048a425c25a452aa62c39da89
# Parent  023e6051c4c63ab1633b2de0e8f37e6158796288
threadpool: utilize all processors on embedded ARM platforms

diff -r 023e6051c4c6 -r 18b83aaee1b5 source/common/threadpool.cpp
--- a/source/common/threadpool.cpp	Fri Feb 05 15:13:57 2016 +0530
+++ b/source/common/threadpool.cpp	Tue Feb 09 15:06:29 2016 +0530
@@ -528,6 +528,10 @@
     SYSTEM_INFO sysinfo;
     GetSystemInfo(&sysinfo);
     return sysinfo.dwNumberOfProcessors;
+#elif __unix__ && X265_ARCH_ARM
+    /* Return the number of processors configured by OS. Because, most embedded linux distributions
+     * uses only one processor as the scheduler doesn't have enough work to utilize all processors */
+    return sysconf(_SC_NPROCESSORS_CONF);
 #elif __unix__
     return sysconf(_SC_NPROCESSORS_ONLN);
 #elif MACOS


More information about the x265-devel mailing list