Skip to content

Instantly share code, notes, and snippets.

@nkurz
Created December 11, 2016 09:35
Show Gist options
  • Save nkurz/ff4f6a495428c5c0eaffb3521ad8439b to your computer and use it in GitHub Desktop.
Save nkurz/ff4f6a495428c5c0eaffb3521ad8439b to your computer and use it in GitHub Desktop.
for CC in "gcc-4.8" \
"gcc-4.9" \
"gcc-5" "gcc-5 -flto" \
"gcc-6" "gcc-6 -flto" \
"icc-16" "icc-16 -ipo" \
"icc-17" "icc-17 -ipo" \
"clang-4.0" "clang-4.0 -flto"
do
for CFLAGS in "-O0" "-O0 -march=native" \
"-O1" "-O1 -march=native" \
"-O2" "-O2 -march=native" \
"-O3" "-O3 -march=native" \
"-Ofast" "-Ofast -march=native"
do
rm fft-test-portable
$CC $CFLAGS -o fft-test-portable fft-test.c fft-portable.c -lm
echo "$CC $CFLAGS fft-test-portable" && fft-test-portable
echo
rm fft-test-model
$CC $CFLAGS -o fft-test-model fft-test.c fft-x8664-avx-aux.c fft-model-of-x8664-avx.c -lm
echo "$CC $CFLAGS fft-test-model" && fft-test-model
echo
rm fft-test-asm
$CC $CFLAGS -o fft-test-asm fft-test.c fft-x8664-avx-aux.c fft-x8664-avx.s -lm
echo "$CC $CFLAGS fft-test-asm" && fft-test-asm
echo
done
echo "------------------------"
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment