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

Mahesh Pittala mahesh at multicorewareinc.com
Tue Dec 22 13:46:35 CET 2015


I have tested on Linux, Mac and windows, now it is fine. if you think it
still through an error on different platforms then my second patch(toupper) is
better for all.

On Tue, Dec 22, 2015 at 6:15 PM, <mahesh at multicorewareinc.com> wrote:

> # 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++)
>                  {
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20151222/c770283e/attachment.html>


More information about the x265-devel mailing list