Browse Source

Providers: hint path normalization

dependabot/nuget/NUnit3TestAdapter-4.2.0
Christoph Ruegg 5 years ago
parent
commit
8dcecb1125
  1. 19
      src/Numerics.Tests/UseLinearAlgebraProvider.cs
  2. 3
      src/Providers.CUDA/LinearAlgebra/CudaLinearAlgebraProvider.cs
  3. 3
      src/Providers.MKL/FourierTransform/MklFourierTransformProvider.cs
  4. 4
      src/Providers.MKL/LinearAlgebra/MklLinearAlgebraProvider.cs
  5. 3
      src/Providers.MKL/SparseSolver/MklSparseSolverProvider.cs
  6. 3
      src/Providers.OpenBLAS/LinearAlgebra/OpenBlasLinearAlgebraProvider.cs

19
src/Numerics.Tests/UseLinearAlgebraProvider.cs

@ -28,6 +28,7 @@
// </copyright> // </copyright>
using System; using System;
using System.IO;
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Interfaces; using NUnit.Framework.Interfaces;
@ -46,14 +47,17 @@ namespace MathNet.Numerics.UnitTests
{ {
public void BeforeTest(ITest testDetails) public void BeforeTest(ITest testDetails)
{ {
string outDir = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), @"../../../../../out/"); string outDir = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), @"../../../../../out/"));
#if MKL #if MKL
Control.NativeProviderPath = System.IO.Path.Combine(outDir, @"MKL/Windows/"); Control.NativeProviderPath = Path.GetFullPath(Path.Combine(outDir, @"MKL/Windows/"));
MklControl.UseNativeMKL(MklConsistency.AVX, MklPrecision.Double, MklAccuracy.High); Control.UseNativeMKL();
//MklControl.UseNativeMKL(MklConsistency.AVX, MklPrecision.Double, MklAccuracy.High);
#elif CUDA #elif CUDA
CudaControl.UseNativeCUDA(); Control.UseNativeCUDA();
//CudaControl.UseNativeCUDA();
#elif OPENBLAS #elif OPENBLAS
OpenBlasControl.UseNativeOpenBLAS(); Control.UseNativeOpenBLAS();
//OpenBlasControl.UseNativeOpenBLAS();
#else #else
Control.UseManaged(); Control.UseManaged();
#endif #endif
@ -68,9 +72,6 @@ namespace MathNet.Numerics.UnitTests
{ {
} }
public ActionTargets Targets public ActionTargets Targets => ActionTargets.Suite;
{
get { return ActionTargets.Suite; }
}
} }
} }

3
src/Providers.CUDA/LinearAlgebra/CudaLinearAlgebraProvider.cs

@ -28,6 +28,7 @@
// </copyright> // </copyright>
using System; using System;
using System.IO;
using MathNet.Numerics.Providers.LinearAlgebra; using MathNet.Numerics.Providers.LinearAlgebra;
namespace MathNet.Numerics.Providers.CUDA.LinearAlgebra namespace MathNet.Numerics.Providers.CUDA.LinearAlgebra
@ -46,7 +47,7 @@ namespace MathNet.Numerics.Providers.CUDA.LinearAlgebra
/// <param name="hintPath">Hint path where to look for the native binaries</param> /// <param name="hintPath">Hint path where to look for the native binaries</param>
internal CudaLinearAlgebraProvider(string hintPath) internal CudaLinearAlgebraProvider(string hintPath)
{ {
_hintPath = hintPath; _hintPath = Path.GetFullPath(hintPath);
} }
/// <summary> /// <summary>

3
src/Providers.MKL/FourierTransform/MklFourierTransformProvider.cs

@ -27,6 +27,7 @@
// </copyright> // </copyright>
using System; using System;
using System.IO;
using System.Security; using System.Security;
using System.Threading; using System.Threading;
using MathNet.Numerics.Providers.FourierTransform; using MathNet.Numerics.Providers.FourierTransform;
@ -53,7 +54,7 @@ namespace MathNet.Numerics.Providers.MKL.FourierTransform
/// <param name="hintPath">Hint path where to look for the native binaries</param> /// <param name="hintPath">Hint path where to look for the native binaries</param>
internal MklFourierTransformProvider(string hintPath) internal MklFourierTransformProvider(string hintPath)
{ {
_hintPath = hintPath; _hintPath = Path.GetFullPath(hintPath);
} }
/// <summary> /// <summary>

4
src/Providers.MKL/LinearAlgebra/MklLinearAlgebraProvider.cs

@ -28,7 +28,7 @@
// </copyright> // </copyright>
using System; using System;
using System.Numerics; using System.IO;
using System.Security; using System.Security;
using MathNet.Numerics.Providers.LinearAlgebra; using MathNet.Numerics.Providers.LinearAlgebra;
@ -71,7 +71,7 @@ namespace MathNet.Numerics.Providers.MKL.LinearAlgebra
/// <param name="accuracy">VML accuracy mode.</param> /// <param name="accuracy">VML accuracy mode.</param>
internal MklLinearAlgebraProvider(string hintPath, MklConsistency consistency, MklPrecision precision, MklAccuracy accuracy) internal MklLinearAlgebraProvider(string hintPath, MklConsistency consistency, MklPrecision precision, MklAccuracy accuracy)
{ {
_hintPath = hintPath; _hintPath = Path.GetFullPath(hintPath);
_consistency = consistency; _consistency = consistency;
_precision = precision; _precision = precision;
_accuracy = accuracy; _accuracy = accuracy;

3
src/Providers.MKL/SparseSolver/MklSparseSolverProvider.cs

@ -1,4 +1,5 @@
using System; using System;
using System.IO;
using MathNet.Numerics.Providers.SparseSolver; using MathNet.Numerics.Providers.SparseSolver;
namespace MathNet.Numerics.Providers.MKL.SparseSolver namespace MathNet.Numerics.Providers.MKL.SparseSolver
@ -18,7 +19,7 @@ namespace MathNet.Numerics.Providers.MKL.SparseSolver
/// <param name="hintPath">Hint path where to look for the native binaries</param> /// <param name="hintPath">Hint path where to look for the native binaries</param>
internal MklSparseSolverProvider(string hintPath) internal MklSparseSolverProvider(string hintPath)
{ {
_hintPath = hintPath; _hintPath = Path.GetFullPath(hintPath);
} }
/// <summary> /// <summary>

3
src/Providers.OpenBLAS/LinearAlgebra/OpenBlasLinearAlgebraProvider.cs

@ -28,6 +28,7 @@
// </copyright> // </copyright>
using System; using System;
using System.IO;
using MathNet.Numerics.Providers.LinearAlgebra; using MathNet.Numerics.Providers.LinearAlgebra;
namespace MathNet.Numerics.Providers.OpenBLAS.LinearAlgebra namespace MathNet.Numerics.Providers.OpenBLAS.LinearAlgebra
@ -62,7 +63,7 @@ namespace MathNet.Numerics.Providers.OpenBLAS.LinearAlgebra
/// <param name="hintPath">Hint path where to look for the native binaries</param> /// <param name="hintPath">Hint path where to look for the native binaries</param>
internal OpenBlasLinearAlgebraProvider(string hintPath) internal OpenBlasLinearAlgebraProvider(string hintPath)
{ {
_hintPath = hintPath; _hintPath = Path.GetFullPath(hintPath);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save