diff --git a/MathNet.Numerics.NativeProviders.sln b/MathNet.Numerics.NativeProviders.sln index 21805ccb..9a265ad5 100644 --- a/MathNet.Numerics.NativeProviders.sln +++ b/MathNet.Numerics.NativeProviders.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{5A0892FF-82CE-40FC-BCE1-73810C615F52}" ProjectSection(SolutionItems) = preProject @@ -28,6 +28,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests-OpenBLAS", "src\U EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestData", "src\TestData\TestData.csproj", "{AF3253C9-4DB5-45A0-98CF-C105FDA9DA47}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Readme", "Readme", "{77CF160D-3AE0-45A2-8224-6322C28C2685}" + ProjectSection(SolutionItems) = preProject + README.md = README.md + RELEASENOTES-CUDA.md = RELEASENOTES-CUDA.md + RELEASENOTES-MKL.md = RELEASENOTES-MKL.md + RELEASENOTES-OpenBLAS.md = RELEASENOTES-OpenBLAS.md + RELEASENOTES.md = RELEASENOTES.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{9275D8F1-84B4-404F-AC1F-EE1211C9F744}" + ProjectSection(SolutionItems) = preProject + docs\content\Build.md = docs\content\Build.md + docs\content\Compatibility.md = docs\content\Compatibility.md + docs\content\Contributing.md = docs\content\Contributing.md + docs\content\Contributors.md = docs\content\Contributors.md + docs\content\License.md = docs\content\License.md + docs\content\MKL.md = docs\content\MKL.md + docs\content\Packages.md = docs\content\Packages.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/NativeProviders/CUDA/capabilities.cpp b/src/NativeProviders/CUDA/capabilities.cpp index 75fb1d59..b318f4ab 100644 --- a/src/NativeProviders/CUDA/capabilities.cpp +++ b/src/NativeProviders/CUDA/capabilities.cpp @@ -45,7 +45,8 @@ extern "C" { case 64: return 1; // revision // LINEAR ALGEBRA - case 128: return 1; // basic dense linear algebra + case 128: return 1; // basic dense linear algebra (major - breaking) + case 129: return 0; // basic dense linear algebra (minor - non-breaking) // OPTIMIZATION case 256: return 0; // basic optimization diff --git a/src/NativeProviders/MKL/capabilities.cpp b/src/NativeProviders/MKL/capabilities.cpp index 302f5c15..854a5b97 100644 --- a/src/NativeProviders/MKL/capabilities.cpp +++ b/src/NativeProviders/MKL/capabilities.cpp @@ -41,13 +41,14 @@ extern "C" { #endif // COMMON/SHARED - case 64: return 8; // revision + case 64: return 9; // revision case 65: return 1; // numerical consistency, precision and accuracy modes case 66: return 1; // threading control case 67: return 1; // memory management // LINEAR ALGEBRA - case 128: return 1; // basic dense linear algebra + case 128: return 2; // basic dense linear algebra (major - breaking) + case 129: return 0; // basic dense linear algebra (minor - non-breaking) // OPTIMIZATION case 256: return 0; // basic optimization diff --git a/src/NativeProviders/OpenBLAS/capabilities.cpp b/src/NativeProviders/OpenBLAS/capabilities.cpp index 4e51b6c1..80060ca4 100644 --- a/src/NativeProviders/OpenBLAS/capabilities.cpp +++ b/src/NativeProviders/OpenBLAS/capabilities.cpp @@ -45,7 +45,8 @@ extern "C" { case 66: return 1; // threading control // LINEAR ALGEBRA - case 128: return 1; // basic dense linear algebra + case 128: return 1; // basic dense linear algebra (major - breaking) + case 129: return 0; // basic dense linear algebra (minor - non-breaking) default: return 0; // unknown or not supported diff --git a/src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs b/src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs index 5aa12c7a..b3393973 100644 --- a/src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs +++ b/src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs @@ -174,9 +174,15 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Mkl throw new NotSupportedException("MKL Native Provider does not support capability querying and is therefore not compatible. Consider upgrading to a newer version.", e); } - if (a != 0 || b != -1 || linearAlgebra <=0 || _nativeRevision < 4) + if (a != 0 || b != -1 || _nativeRevision < 4) { - throw new NotSupportedException("MKL Native Provider too old or not compatible. Consider upgrading to a newer version."); + throw new NotSupportedException("MKL Native Provider too old. Consider upgrading to a newer version."); + } + + // we only support exactly one major version, since major version changes imply a breaking change. + if (linearAlgebra != 2) + { + throw new NotSupportedException(string.Format("MKL Native Provider not compatible. Expecting linear algebra v2 but provider implements v{0}.", linearAlgebra)); } // set numerical consistency, precision and accuracy modes, if supported diff --git a/src/Numerics/Providers/LinearAlgebra/Mkl/MklProviderCapabilities.cs b/src/Numerics/Providers/LinearAlgebra/Mkl/MklProviderCapabilities.cs index 80ec4ebb..3bf3c9b4 100644 --- a/src/Numerics/Providers/LinearAlgebra/Mkl/MklProviderCapabilities.cs +++ b/src/Numerics/Providers/LinearAlgebra/Mkl/MklProviderCapabilities.cs @@ -48,5 +48,6 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Mkl internal enum ProviderCapability : int { LinearAlgebra = 128, + LinearAlgebraMinor = 129, } }