示例#1
0
        /// <summary>
        /// Try to use any available native provider in an undefined order.
        /// </summary>
        /// <returns>
        /// True if one of the native providers was found and successfully initialized.
        /// False if it failed and the previous provider is still active.
        /// </returns>
        public static bool TryUseNative()
        {
            bool linearAlgebra    = LinearAlgebraControl.TryUseNative();
            bool fourierTransform = FourierTransformControl.TryUseNative();

            return(linearAlgebra || fourierTransform);
        }
示例#2
0
        /// <summary>
        /// Try to use any available native provider in an undefined order.
        /// </summary>
        /// <returns>
        /// True if one of the native providers was found and successfully initialized.
        /// False if it failed and the previous provider is still active.
        /// </returns>
        public static bool TryUseNative()
        {
            if (AppSwitches.DisableNativeProviders || AppSwitches.DisableNativeProviderProbing)
            {
                return(false);
            }

            bool linearAlgebra      = LinearAlgebraControl.TryUseNative();
            bool fourierTransform   = FourierTransformControl.TryUseNative();
            bool directSparseSolver = SparseSolverControl.TryUseNative();

            return(linearAlgebra || fourierTransform || directSparseSolver);
        }