2018-10-30 18:43:02 -07:00
|
|
|
using System.Runtime.Intrinsics.X86;
|
|
|
|
|
|
|
|
public static class Optimizations
|
|
|
|
{
|
|
|
|
internal static bool FastFP = true;
|
|
|
|
|
|
|
|
private static bool _useAllSseIfAvailable = true;
|
|
|
|
|
|
|
|
private static bool _useSseIfAvailable = true;
|
|
|
|
private static bool _useSse2IfAvailable = true;
|
2018-12-26 09:11:36 -08:00
|
|
|
private static bool _useSse3IfAvailable = true;
|
2018-12-01 16:34:43 -08:00
|
|
|
private static bool _useSsse3IfAvailable = true;
|
2018-10-30 18:43:02 -07:00
|
|
|
private static bool _useSse41IfAvailable = true;
|
|
|
|
private static bool _useSse42IfAvailable = true;
|
|
|
|
|
|
|
|
internal static bool UseSse = (_useAllSseIfAvailable && _useSseIfAvailable) && Sse.IsSupported;
|
|
|
|
internal static bool UseSse2 = (_useAllSseIfAvailable && _useSse2IfAvailable) && Sse2.IsSupported;
|
2018-12-26 09:11:36 -08:00
|
|
|
internal static bool UseSse3 = (_useAllSseIfAvailable && _useSse3IfAvailable) && Sse3.IsSupported;
|
2018-12-01 16:34:43 -08:00
|
|
|
internal static bool UseSsse3 = (_useAllSseIfAvailable && _useSsse3IfAvailable) && Ssse3.IsSupported;
|
2018-10-30 18:43:02 -07:00
|
|
|
internal static bool UseSse41 = (_useAllSseIfAvailable && _useSse41IfAvailable) && Sse41.IsSupported;
|
|
|
|
internal static bool UseSse42 = (_useAllSseIfAvailable && _useSse42IfAvailable) && Sse42.IsSupported;
|
|
|
|
}
|