2022-03-17 10:14:08 +01:00
|
|
|
#!/bin/bash
|
2022-02-25 16:33:46 +01:00
|
|
|
|
2022-07-23 13:08:24 +02:00
|
|
|
PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/scripts:$PATH"
|
2022-03-25 10:14:48 +01:00
|
|
|
|
|
|
|
CPU_DETECTED=$(lshw -c processor -json 2>/dev/null)
|
2022-02-25 16:33:46 +01:00
|
|
|
|
2022-03-23 08:16:01 +01:00
|
|
|
if [[ $(echo "${CPU_DETECTED}" | jq -r '.[].capabilities.avx2') == "true" ]]; then
|
2022-02-25 16:33:46 +01:00
|
|
|
echo "avx2"
|
2022-03-23 08:16:01 +01:00
|
|
|
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[].capabilities.avx') == "true" ]]; then
|
2022-02-25 16:33:46 +01:00
|
|
|
echo "avx"
|
|
|
|
fi
|