Skip to content

Adding FMA and AVX2 config switches

Victor Ding requested to merge 0dvictor/opus:avx2 into master

Most modern x86 processors have FMA and AVX2, which OPUS could leverage for better performance.

This commit replaces existing AVX flag to a new flag guarding all AVX, FMA, and AVX2; mainly because:

  1. AVX-optimized FP code usually comes with opportunities for FMA;
  2. CPUs support FMA but not AVX2 are rare (AMD Bulldozer Gen 2 and 3);
  3. No CPU supports AVX2 but not FMA;
  4. MSVC's /arch:AVX2 controls both FMA and AVX2.
Edited by Victor Ding

Merge request reports