diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/dav1d/tests/dav1d_argon.bash | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/dav1d/tests/dav1d_argon.bash')
-rwxr-xr-x | third_party/dav1d/tests/dav1d_argon.bash | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/third_party/dav1d/tests/dav1d_argon.bash b/third_party/dav1d/tests/dav1d_argon.bash index 27a8d61911..954dad8d2d 100755 --- a/third_party/dav1d/tests/dav1d_argon.bash +++ b/third_party/dav1d/tests/dav1d_argon.bash @@ -4,8 +4,8 @@ DAV1D="tools/dav1d" ARGON_DIR='.' FILMGRAIN=1 CPUMASK=-1 -THREADS=0 -JOBS=1 +THREADS=1 +JOBS=0 usage() { NAME=$(basename "$0") @@ -19,8 +19,8 @@ usage() { printf " -a dir path to argon dir (default: 'tests/argon' if found; '.' otherwise)\n" printf " -g \$num enable filmgrain (default: 1)\n" printf " -c \$mask use restricted cpumask (default: -1)\n" - printf " -t \$num number of threads per dav1d (default: 0)\n" - printf " -j \$num number of parallel dav1d processes (default: 1)\n\n" + printf " -t \$num number of threads per dav1d (default: 1)\n" + printf " -j \$num number of parallel dav1d processes (default: 0)\n\n" } >&2 exit 1 } @@ -110,6 +110,14 @@ while getopts ":d:a:g:c:t:j:" opt; do done shift $((OPTIND-1)) +if [ "$JOBS" -eq 0 ]; then + if [ "$THREADS" -gt 0 ]; then + JOBS="$((($( (nproc || sysctl -n hw.logicalcpu || getconf _NPROCESSORS_ONLN || echo 1) 2>/dev/null)+THREADS-1)/THREADS))" + else + JOBS=1 + fi +fi + if [ "$#" -eq 0 ]; then # Everything except large scale tiles and stress files. dirs=("$ARGON_DIR/profile0_core" "$ARGON_DIR/profile0_core_special" |