[x265] [PATCH] threadpool: use all available threads on each NUMA node with --pools=NULL option too
David Wolstencroft
lordrpi at gmail.com
Fri Dec 18 18:19:47 CET 2015
You might want to use the strcasecmp / strncasecmp because it's available
on more platforms than stricmp.
>From OS X:
Davids-iMac:~ dw$ uname -a
Darwin Davids-iMac.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29
02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Davids-iMac:~ dw$ cat stricmp.c
#include <string.h>
int main()
{
stricmp("FOO", "foo");
strcasecmp("FOO", "foo");
return 0;
}
Davids-iMac:~ dw$ gcc stricmp.c
stricmp.c:6:3: warning: implicit declaration of function 'stricmp' is
invalid in C99 [-Wimplicit-function-declaration]
stricmp("FOO", "foo");
^
1 warning generated.
Undefined symbols for architecture x86_64:
"_stricmp", referenced from:
_main in stricmp-a7cab7.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
On Thu, Dec 17, 2015 at 8:26 PM, <mahesh at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Mahesh Pittala <mahesh at multicorewareinc.com>
> # Date 1450412779 -19800
> # Fri Dec 18 09:56:19 2015 +0530
> # Node ID edaf7565eebb213fb53a2e6e4e073ddaa7167576
> # Parent 9c797a5915814a74663f4f1f4edf8a9fd17d5c42
> 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 9c797a591581 -r edaf7565eebb source/common/threadpool.cpp
> --- a/source/common/threadpool.cpp Thu Dec 10 21:37:01 2015 +0530
> +++ b/source/common/threadpool.cpp Fri Dec 18 09:56:19 2015 +0530
> @@ -277,7 +277,7 @@
> }
> else if (*nodeStr == '-')
> threadsPerPool[i] = 0;
> - else if (*nodeStr == '*')
> + else if (*nodeStr == '*' || !stricmp(nodeStr,
> "NULL"))
> {
> for (int j = i; j < numNumaNodes; j++)
> {
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20151218/d43f7490/attachment.html>
More information about the x265-devel
mailing list