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