/// <summary> /// Initialize and verify that the provided is indeed available. /// If not, fall back to alternatives like the managed provider /// </summary> public override void InitializeVerify() { OpenBlasProvider.Load(minRevision: 1); int linearAlgebra = SafeNativeMethods.query_capability((int)ProviderCapability.LinearAlgebraMajor); // we only support exactly one major version, since major version changes imply a breaking change. if (linearAlgebra != 1) { throw new NotSupportedException(string.Format("OpenBLAS Native Provider not compatible. Expecting linear algebra v1 but provider implements v{0}.", linearAlgebra)); } }
/// <summary> /// Initialize and verify that the provided is indeed available. /// If not, fall back to alternatives like the managed provider /// </summary> public override void InitializeVerify() { int revision = OpenBlasProvider.Load(hintPath: _hintPath); if (revision < MinimumCompatibleRevision) { throw new NotSupportedException(FormattableString.Invariant($"OpenBLAS Native Provider revision r{revision} is too old. Consider upgrading to a newer version. Revision r{MinimumCompatibleRevision} and newer are supported.")); } int linearAlgebra = SafeNativeMethods.query_capability((int)ProviderCapability.LinearAlgebraMajor); // we only support exactly one major version, since major version changes imply a breaking change. if (linearAlgebra != 1) { throw new NotSupportedException(FormattableString.Invariant($"OpenBLAS Native Provider not compatible. Expecting linear algebra v1 but provider implements v{linearAlgebra}.")); } }