Skip to content

Commit bc6ba90

Browse files
committed
Providers: don't fail if hint path is null
1 parent 67dfe72 commit bc6ba90

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Providers.CUDA/LinearAlgebra/CudaLinearAlgebraProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ internal sealed partial class CudaLinearAlgebraProvider : ILinearAlgebraProvider
4747
/// <param name="hintPath">Hint path where to look for the native binaries</param>
4848
internal CudaLinearAlgebraProvider(string hintPath)
4949
{
50-
_hintPath = Path.GetFullPath(hintPath);
50+
_hintPath = hintPath != null ? Path.GetFullPath(hintPath) : null;
5151
}
5252

5353
/// <summary>

src/Providers.MKL/FourierTransform/MklFourierTransformProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Kernel
5454
/// <param name="hintPath">Hint path where to look for the native binaries</param>
5555
internal MklFourierTransformProvider(string hintPath)
5656
{
57-
_hintPath = Path.GetFullPath(hintPath);
57+
_hintPath = hintPath != null ? Path.GetFullPath(hintPath) : null;
5858
}
5959

6060
/// <summary>

src/Providers.MKL/LinearAlgebra/MklLinearAlgebraProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ internal sealed partial class MklLinearAlgebraProvider : ILinearAlgebraProvider,
7171
/// <param name="accuracy">VML accuracy mode.</param>
7272
internal MklLinearAlgebraProvider(string hintPath, MklConsistency consistency, MklPrecision precision, MklAccuracy accuracy)
7373
{
74-
_hintPath = Path.GetFullPath(hintPath);
74+
_hintPath = hintPath != null ? Path.GetFullPath(hintPath) : null;
7575
_consistency = consistency;
7676
_precision = precision;
7777
_accuracy = accuracy;

src/Providers.MKL/SparseSolver/MklSparseSolverProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ internal sealed partial class MklSparseSolverProvider : ISparseSolverProvider, I
1919
/// <param name="hintPath">Hint path where to look for the native binaries</param>
2020
internal MklSparseSolverProvider(string hintPath)
2121
{
22-
_hintPath = Path.GetFullPath(hintPath);
22+
_hintPath = hintPath != null ? Path.GetFullPath(hintPath) : null;
2323
}
2424

2525
/// <summary>

src/Providers.OpenBLAS/LinearAlgebra/OpenBlasLinearAlgebraProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ internal sealed partial class OpenBlasLinearAlgebraProvider : ILinearAlgebraProv
6363
/// <param name="hintPath">Hint path where to look for the native binaries</param>
6464
internal OpenBlasLinearAlgebraProvider(string hintPath)
6565
{
66-
_hintPath = Path.GetFullPath(hintPath);
66+
_hintPath = hintPath != null ? Path.GetFullPath(hintPath) : null;
6767
}
6868

6969
/// <summary>

0 commit comments

Comments
 (0)