AOptimizations.cs 752 B

12345678910111213141516
  1. using System.Runtime.Intrinsics.X86;
  2. public static class AOptimizations
  3. {
  4. private static bool UseAllSseIfAvailable = true;
  5. private static bool UseSseIfAvailable = true;
  6. private static bool UseSse2IfAvailable = true;
  7. private static bool UseSse41IfAvailable = true;
  8. private static bool UseSse42IfAvailable = true;
  9. internal static bool UseSse = (UseAllSseIfAvailable && UseSseIfAvailable) && Sse.IsSupported;
  10. internal static bool UseSse2 = (UseAllSseIfAvailable && UseSse2IfAvailable) && Sse2.IsSupported;
  11. internal static bool UseSse41 = (UseAllSseIfAvailable && UseSse41IfAvailable) && Sse41.IsSupported;
  12. internal static bool UseSse42 = (UseAllSseIfAvailable && UseSse42IfAvailable) && Sse42.IsSupported;
  13. }