Config files to make everyday life easier...
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
538 B

function hyperthreading {
case "${1^^}" in
"OFF")
pkexec tee /sys/devices/system/cpu/smt/control <<< off
# Update Julia settings
if [ -v $JULIA_NUM_THREADS ]; then
exit 0;
else
JULIA_NUM_THREADS=$(nproc)
fi
;;
"ON")
pkexec tee /sys/devices/system/cpu/smt/control <<< on
# Update Julia settings
if [ -v $JULIA_NUM_THREADS ]; then
exit 0;
else
JULIA_NUM_THREADS=$(nproc);
fi
;;
*)
printf "To enable or disable hyperthreading dinamically, use ON or OFF.\n"
;;
esac
}