public static bool TryUse(ISparseSolverProvider provider) { try { if (provider == null || !provider.IsAvailable()) { return(false); } Provider = provider; return(true); } catch { // intentionally swallow exceptions here - use the explicit variants if you're interested in why return(false); } }
public static void UseNativeMKL() => Provider = MklProbe.Create();
public static void UseManaged() => Provider = CreateManaged();
public static void UseManaged() => Provider = ManagedSparseSolverProvider.Instance;