mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
added cpu core counting...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8240771409
commit
6962d7c9a6
@ -1,7 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# XXX get this from /proc/cpuinfo...
|
# SPU threads to keep free...
|
||||||
THREADS=6
|
KEEP_FREE=2
|
||||||
|
|
||||||
|
THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l`
|
||||||
|
if [ $KEEP_FREE ] ; then
|
||||||
|
THREADS=$((THREADS - KEEP_FREE))
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO make this runnable from anywhere...
|
# TODO make this runnable from anywhere...
|
||||||
# - prepend paths with './' only if local/relative
|
# - prepend paths with './' only if local/relative
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# XXX get this from /proc/cpuinfo...
|
# SPU threads to keep free...
|
||||||
THREADS=6
|
KEEP_FREE=2
|
||||||
|
|
||||||
|
THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l`
|
||||||
|
if [ $KEEP_FREE ] ; then
|
||||||
|
THREADS=$((THREADS - KEEP_FREE))
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO make this runnable from anywhere...
|
# TODO make this runnable from anywhere...
|
||||||
# - prepend paths with './' only if local/relative
|
# - prepend paths with './' only if local/relative
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user