[x265] [PATCH] threadpool: use all available threads on each NUMA node with --pools=NULL option too

mahesh at multicorewareinc.com mahesh at multicorewareinc.com
Tue Dec 22 13:45:07 CET 2015


# HG changeset patch
# User Mahesh Pittala <mahesh at muticorewareinc.com>
# Date 1450788208 -19800
#      Tue Dec 22 18:13:28 2015 +0530
# Node ID 6a0bb9c80bd3f5e8d66ac04c0f44c88ec83345d1
# Parent  5276fbdce4bd2598b8ccf363319f94c31523272d
threadpool: use all available threads on each NUMA node with --pools=NULL option too

 from x265.readthedocs, --pools = NULL, "", "*" are doing same functionality.
--pools="" & --pools="*" are using all threads but when we pass --pools=NULL, disabled
all threads pools but supposed to enable.

diff -r 5276fbdce4bd -r 6a0bb9c80bd3 source/common/threadpool.cpp
--- a/source/common/threadpool.cpp	Tue Dec 22 09:05:34 2015 +0530
+++ b/source/common/threadpool.cpp	Tue Dec 22 18:13:28 2015 +0530
@@ -60,6 +60,9 @@
 #if HAVE_LIBNUMA
 #include <numa.h>
 #endif
+#if defined(_MSC_VER)
+# define strcasecmp _stricmp
+#endif
 
 namespace X265_NS {
 // x265 private namespace
@@ -277,7 +280,7 @@
             }
             else if (*nodeStr == '-')
                 threadsPerPool[i] = 0;
-            else if (*nodeStr == '*')
+			else if (*nodeStr == '*' || !strcasecmp(nodeStr, "NULL"))
             {
                 for (int j = i; j < numNumaNodes; j++)
                 {


More information about the x265-devel mailing list