Browse Source

FFT: rework provider discovery to throw less exceptions and work better

when FFT and LA use different providers
benchmark-la
Christoph Ruegg 10 years ago
parent
commit
037c1043cb
  1. 99
      src/Numerics/Control.cs
  2. 2
      src/Numerics/Numerics.csproj
  3. 24
      src/Numerics/Providers/Common/Mkl/MklProvider.cs
  4. 97
      src/Numerics/Providers/FourierTransform/FourierTransformControl.cs
  5. 6
      src/Numerics/Providers/FourierTransform/IFourierTransformProvider.cs
  6. 12
      src/Numerics/Providers/FourierTransform/ManagedFourierTransformProvider.cs
  7. 12
      src/Numerics/Providers/FourierTransform/Mkl/MklFourierTransformProvider.cs
  8. 28
      src/Numerics/Providers/LinearAlgebra/Cuda/CudaLinearAlgebraProvider.cs
  9. 6
      src/Numerics/Providers/LinearAlgebra/ILinearAlgebraProvider.cs
  10. 120
      src/Numerics/Providers/LinearAlgebra/LinearAlgebraControl.cs
  11. 9
      src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.cs
  12. 11
      src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs
  13. 32
      src/Numerics/Providers/LinearAlgebra/OpenBlas/OpenBlasLinearAlgebraProvider.cs

99
src/Numerics/Control.cs

@ -27,10 +27,10 @@
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
using MathNet.Numerics.Providers.LinearAlgebra;
using System;
using System.Threading.Tasks;
using MathNet.Numerics.Providers.FourierTransform;
using MathNet.Numerics.Providers.LinearAlgebra;
namespace MathNet.Numerics
{
@ -39,8 +39,6 @@ namespace MathNet.Numerics
/// </summary>
public static class Control
{
const string EnvVarLAProvider = "MathNetNumericsLAProvider";
static int _maxDegreeOfParallelism;
static int _blockSize;
static int _parallelizeOrder;
@ -68,54 +66,10 @@ namespace MathNet.Numerics
TaskScheduler = TaskScheduler.Default;
}
private static void InitializeDefaultProviders()
{
lock (_staticLock)
{
if (_linearAlgebraProvider == null || _fourierTransformProvider == null)
{
#if NATIVE
try
{
var value = Environment.GetEnvironmentVariable(EnvVarLAProvider);
switch (value != null ? value.ToUpperInvariant() : string.Empty)
{
case "MKL":
UseNativeMKL();
break;
case "CUDA":
UseNativeCUDA();
break;
case "OPENBLAS":
UseNativeOpenBLAS();
break;
default:
if (!TryUseNative())
{
UseManaged();
}
break;
}
}
catch
{
// We don't care about any failures here at all (because "auto")
UseManaged();
}
#else
UseManaged();
#endif
}
}
}
public static void UseManaged()
{
LinearAlgebraProvider = new ManagedLinearAlgebraProvider();
FourierTransformProvider = new ManagedFourierTransformProvider();
LinearAlgebraControl.UseManaged();
FourierTransformControl.UseManaged();
}
#if NATIVE
@ -126,8 +80,8 @@ namespace MathNet.Numerics
/// </summary>
public static void UseNativeMKL()
{
LinearAlgebraProvider = new Providers.LinearAlgebra.Mkl.MklLinearAlgebraProvider();
FourierTransformProvider = new Providers.FourierTransform.Mkl.MklFourierTransformProvider();
LinearAlgebraControl.UseNativeMKL();
FourierTransformControl.UseNativeMKL();
}
/// <summary>
@ -141,8 +95,11 @@ namespace MathNet.Numerics
Providers.LinearAlgebra.Mkl.MklPrecision precision = Providers.LinearAlgebra.Mkl.MklPrecision.Double,
Providers.LinearAlgebra.Mkl.MklAccuracy accuracy = Providers.LinearAlgebra.Mkl.MklAccuracy.High)
{
LinearAlgebraProvider = new Providers.LinearAlgebra.Mkl.MklLinearAlgebraProvider(consistency, precision, accuracy);
FourierTransformProvider = new Providers.FourierTransform.Mkl.MklFourierTransformProvider();
LinearAlgebraControl.UseNativeMKL(
(Providers.Common.Mkl.MklConsistency)consistency,
(Providers.Common.Mkl.MklPrecision)precision,
(Providers.Common.Mkl.MklAccuracy)accuracy);
FourierTransformControl.UseNativeMKL();
}
/// <summary>
@ -155,8 +112,8 @@ namespace MathNet.Numerics
Providers.Common.Mkl.MklPrecision precision = Providers.Common.Mkl.MklPrecision.Double,
Providers.Common.Mkl.MklAccuracy accuracy = Providers.Common.Mkl.MklAccuracy.High)
{
LinearAlgebraProvider = new Providers.LinearAlgebra.Mkl.MklLinearAlgebraProvider(consistency, precision, accuracy);
FourierTransformProvider = new Providers.FourierTransform.Mkl.MklFourierTransformProvider();
LinearAlgebraControl.UseNativeMKL(consistency, precision, accuracy);
FourierTransformControl.UseNativeMKL();
}
/// <summary>
@ -177,11 +134,7 @@ namespace MathNet.Numerics
/// </summary>
public static void UseNativeCUDA()
{
LinearAlgebraProvider = new Providers.LinearAlgebra.Cuda.CudaLinearAlgebraProvider();
if (_fourierTransformProvider == null)
{
FourierTransformProvider = new ManagedFourierTransformProvider();
}
LinearAlgebraControl.UseNativeCUDA();
}
/// <summary>
@ -202,11 +155,7 @@ namespace MathNet.Numerics
/// </summary>
public static void UseNativeOpenBLAS()
{
LinearAlgebraProvider = new Providers.LinearAlgebra.OpenBlas.OpenBlasLinearAlgebraProvider();
if (_fourierTransformProvider == null)
{
FourierTransformProvider = new ManagedFourierTransformProvider();
}
LinearAlgebraControl.UseNativeOpenBLAS();
}
/// <summary>
@ -296,7 +245,15 @@ namespace MathNet.Numerics
get
{
if (_linearAlgebraProvider == null)
InitializeDefaultProviders();
{
lock (_staticLock)
{
if (_linearAlgebraProvider == null)
{
LinearAlgebraControl.UseDefault();
}
}
}
return _linearAlgebraProvider;
}
@ -318,7 +275,15 @@ namespace MathNet.Numerics
get
{
if (_fourierTransformProvider == null)
InitializeDefaultProviders();
{
lock (_staticLock)
{
if (_fourierTransformProvider == null)
{
FourierTransformControl.UseDefault();
}
}
}
return _fourierTransformProvider;
}

2
src/Numerics/Numerics.csproj

@ -175,6 +175,7 @@
<Compile Include="Providers\Common\Mkl\MklProvider.cs" />
<Compile Include="Providers\Common\Mkl\MklProviderPrecision.cs" />
<Compile Include="Providers\FourierTransform\IFourierTransformProvider.cs" />
<Compile Include="Providers\FourierTransform\FourierTransformControl.cs" />
<Compile Include="Providers\FourierTransform\ManagedFourierTransformProvider.cs" />
<Compile Include="Providers\FourierTransform\Mkl\MklFourierTransformProvider.cs" />
<Compile Include="Providers\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex.cs" />
@ -190,6 +191,7 @@
<Compile Include="Providers\LinearAlgebra\Cuda\CudaProviderCapabilities.cs" />
<Compile Include="Providers\LinearAlgebra\Cuda\SafeNativeMethods.cs" />
<Compile Include="Providers\Common\Mkl\MklProviderCapabilities.cs" />
<Compile Include="Providers\LinearAlgebra\LinearAlgebraControl.cs" />
<Compile Include="Providers\LinearAlgebra\OpenBlas\OpenBlasLinearAlgebraProvider.cs" />
<Compile Include="Providers\LinearAlgebra\OpenBlas\OpenBlasLinearAlgebraProvider.Complex.cs" />
<Compile Include="Providers\LinearAlgebra\OpenBlas\OpenBlasLinearAlgebraProvider.Complex32.cs" />

24
src/Numerics/Providers/Common/Mkl/MklProvider.cs

@ -40,23 +40,41 @@ namespace MathNet.Numerics.Providers.Common.Mkl
static bool _nativeX64;
static bool _nativeIA64;
public static bool IsAvailable(int minRevision)
{
try
{
if (!NativeProviderLoader.TryLoad(SafeNativeMethods.DllName))
{
return false;
}
int a = SafeNativeMethods.query_capability(0);
int b = SafeNativeMethods.query_capability(1);
int nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
return a == 0 && b == -1 && nativeRevision >= minRevision;
}
catch
{
return false;
}
}
public static void Load(int minRevision)
{
int a, b;
try
{
// Load the native library
NativeProviderLoader.TryLoad(SafeNativeMethods.DllName);
a = SafeNativeMethods.query_capability(0);
b = SafeNativeMethods.query_capability(1);
_nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
_nativeX86 = SafeNativeMethods.query_capability((int)ProviderPlatform.x86) > 0;
_nativeX64 = SafeNativeMethods.query_capability((int)ProviderPlatform.x64) > 0;
_nativeIA64 = SafeNativeMethods.query_capability((int)ProviderPlatform.ia64) > 0;
_nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
_mklVersion = new Version(
SafeNativeMethods.query_capability((int)ProviderConfig.MklMajorVersion),
SafeNativeMethods.query_capability((int)ProviderConfig.MklMinorVersion),

97
src/Numerics/Providers/FourierTransform/FourierTransformControl.cs

@ -0,0 +1,97 @@
// <copyright file="FourierTransformControl.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
//
// Copyright (c) 2009-2016 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
using System;
namespace MathNet.Numerics.Providers.FourierTransform
{
internal static class FourierTransformControl
{
const string EnvVarFFTProvider = "MathNetNumericsFFTProvider";
public static void UseManaged()
{
Control.FourierTransformProvider = new ManagedFourierTransformProvider();
}
#if NATIVE
public static void UseNativeMKL()
{
Control.FourierTransformProvider = new Mkl.MklFourierTransformProvider();
}
#endif
public static bool TryUse(IFourierTransformProvider provider)
{
try
{
if (!provider.IsAvailable())
{
return false;
}
Control.FourierTransformProvider = provider;
return true;
}
catch
{
// intentionally swallow exceptions here - use the explicit variants if you're interested in why
return false;
}
}
public static void UseBest()
{
#if NATIVE
if (!TryUse(new Mkl.MklFourierTransformProvider()))
{
UseManaged();
}
#else
UseManaged();
#endif
}
public static void UseDefault()
{
var value = Environment.GetEnvironmentVariable(EnvVarFFTProvider);
switch (value != null ? value.ToUpperInvariant() : string.Empty)
{
#if NATIVE
case "MKL":
UseNativeMKL();
break;
#endif
default:
UseBest();
break;
}
}
}
}

6
src/Numerics/Providers/FourierTransform/IFourierTransformProvider.cs

@ -43,6 +43,12 @@ namespace MathNet.Numerics.Providers.FourierTransform
public interface IFourierTransformProvider
{
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
bool IsAvailable();
/// <summary>
/// Initialize and verify that the provided is indeed available. If not, fall back to alternatives like the managed provider
/// </summary>

12
src/Numerics/Providers/FourierTransform/ManagedFourierTransformProvider.cs

@ -37,6 +37,18 @@ namespace MathNet.Numerics.Providers.FourierTransform
public class ManagedFourierTransformProvider : IFourierTransformProvider
{
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
public virtual bool IsAvailable()
{
return true;
}
/// <summary>
/// Initialize and verify that the provided is indeed available. If not, fall back to alternatives like the managed provider
/// </summary>
public virtual void InitializeVerify()
{
}

12
src/Numerics/Providers/FourierTransform/Mkl/MklFourierTransformProvider.cs

@ -36,6 +36,18 @@ namespace MathNet.Numerics.Providers.FourierTransform.Mkl
{
public class MklFourierTransformProvider : IFourierTransformProvider
{
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
public bool IsAvailable()
{
return MklProvider.IsAvailable(minRevision: 11);
}
/// <summary>
/// Initialize and verify that the provided is indeed available. If not, fall back to alternatives like the managed provider
/// </summary>
public void InitializeVerify()
{
MklProvider.Load(minRevision: 11);

28
src/Numerics/Providers/LinearAlgebra/Cuda/CudaLinearAlgebraProvider.cs

@ -3,7 +3,7 @@
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
//
// Copyright (c) 2009-2015 Math.NET
// Copyright (c) 2009-2016 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
@ -46,6 +46,30 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Cuda
IntPtr _blasHandle;
IntPtr _solverHandle;
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
public override bool IsAvailable()
{
try
{
if (!NativeProviderLoader.TryLoad(SafeNativeMethods.DllName))
{
return false;
}
int a = SafeNativeMethods.query_capability(0);
int b = SafeNativeMethods.query_capability(1);
int nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
return a == 0 && b == -1 && nativeRevision >= 1;
}
catch
{
return false;
}
}
/// <summary>
/// Initialize and verify that the provided is indeed available.
/// If calling this method fails, consider to fall back to alternatives like the managed provider.
@ -60,12 +84,12 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Cuda
a = SafeNativeMethods.query_capability(0);
b = SafeNativeMethods.query_capability(1);
_nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
_nativeIX86 = SafeNativeMethods.query_capability((int)ProviderPlatform.x86) > 0;
_nativeX64 = SafeNativeMethods.query_capability((int)ProviderPlatform.x64) > 0;
_nativeIA64 = SafeNativeMethods.query_capability((int)ProviderPlatform.ia64) > 0;
_nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
linearAlgebra = SafeNativeMethods.query_capability((int)ProviderCapability.LinearAlgebra);
}
catch (DllNotFoundException e)

6
src/Numerics/Providers/LinearAlgebra/ILinearAlgebraProvider.cs

@ -93,6 +93,12 @@ namespace MathNet.Numerics.Providers.LinearAlgebra
ILinearAlgebraProvider<Complex>,
ILinearAlgebraProvider<Complex32>
{
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
bool IsAvailable();
/// <summary>
/// Initialize and verify that the provided is indeed available. If not, fall back to alternatives like the managed provider
/// </summary>

120
src/Numerics/Providers/LinearAlgebra/LinearAlgebraControl.cs

@ -0,0 +1,120 @@
// <copyright file="LinearAlgebraControl.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
//
// Copyright (c) 2009-2016 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
using System;
namespace MathNet.Numerics.Providers.LinearAlgebra
{
internal static class LinearAlgebraControl
{
const string EnvVarLAProvider = "MathNetNumericsLAProvider";
public static void UseManaged()
{
Control.LinearAlgebraProvider = new ManagedLinearAlgebraProvider();
}
#if NATIVE
public static void UseNativeMKL(
Common.Mkl.MklConsistency consistency = Common.Mkl.MklConsistency.Auto,
Common.Mkl.MklPrecision precision = Common.Mkl.MklPrecision.Double,
Common.Mkl.MklAccuracy accuracy = Common.Mkl.MklAccuracy.High)
{
Control.LinearAlgebraProvider = new Mkl.MklLinearAlgebraProvider(consistency, precision, accuracy);
}
public static void UseNativeCUDA()
{
Control.LinearAlgebraProvider = new Cuda.CudaLinearAlgebraProvider();
}
public static void UseNativeOpenBLAS()
{
Control.LinearAlgebraProvider = new OpenBlas.OpenBlasLinearAlgebraProvider();
}
#endif
public static bool TryUse(ILinearAlgebraProvider provider)
{
try
{
if (!provider.IsAvailable())
{
return false;
}
Control.LinearAlgebraProvider = provider;
return true;
}
catch
{
// intentionally swallow exceptions here - use the explicit variants if you're interested in why
return false;
}
}
public static void UseBest()
{
#if NATIVE
if (!(TryUse(new Cuda.CudaLinearAlgebraProvider())
|| TryUse(new Mkl.MklLinearAlgebraProvider())
|| TryUse(new OpenBlas.OpenBlasLinearAlgebraProvider())))
{
UseManaged();
}
#else
UseManaged();
#endif
}
public static void UseDefault()
{
var value = Environment.GetEnvironmentVariable(EnvVarLAProvider);
switch (value != null ? value.ToUpperInvariant() : string.Empty)
{
#if NATIVE
case "MKL":
UseNativeMKL();
break;
case "CUDA":
UseNativeCUDA();
break;
case "OPENBLAS":
UseNativeOpenBLAS();
break;
#endif
default:
UseBest();
break;
}
}
}
}

9
src/Numerics/Providers/LinearAlgebra/ManagedLinearAlgebraProvider.cs

@ -34,6 +34,15 @@ namespace MathNet.Numerics.Providers.LinearAlgebra
/// </summary>
public partial class ManagedLinearAlgebraProvider : ILinearAlgebraProvider
{
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
public virtual bool IsAvailable()
{
return true;
}
/// <summary>
/// Initialize and verify that the provided is indeed available. If not, fall back to alternatives like the managed provider
/// </summary>

11
src/Numerics/Providers/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs

@ -3,7 +3,7 @@
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
//
// Copyright (c) 2009-2015 Math.NET
// Copyright (c) 2009-2016 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
@ -133,6 +133,15 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.Mkl
_accuracy = Common.Mkl.MklAccuracy.High;
}
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
public override bool IsAvailable()
{
return MklProvider.IsAvailable(minRevision: 4);
}
/// <summary>
/// Initialize and verify that the provided is indeed available.
/// If calling this method fails, consider to fall back to alternatives like the managed provider.

32
src/Numerics/Providers/LinearAlgebra/OpenBlas/OpenBlasLinearAlgebraProvider.cs

@ -3,7 +3,7 @@
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
//
// Copyright (c) 2009-2015 Math.NET
// Copyright (c) 2009-2016 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
@ -63,6 +63,34 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.OpenBlas
bool _nativeIA64;
bool _nativeARM;
/// <summary>
/// Try to find out whether the provider is available, at least in principle.
/// Verification may still fail if available, but it will certainly fail if unavailable.
/// </summary>
public override bool IsAvailable()
{
try
{
if (!NativeProviderLoader.TryLoad(SafeNativeMethods.DllName))
{
return false;
}
int a = SafeNativeMethods.query_capability(0);
int b = SafeNativeMethods.query_capability(1);
int nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
return a == 0 && b == -1 && nativeRevision >= 1;
}
catch
{
return false;
}
}
/// <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 a, b, linearAlgebra;
@ -73,13 +101,13 @@ namespace MathNet.Numerics.Providers.LinearAlgebra.OpenBlas
a = SafeNativeMethods.query_capability(0);
b = SafeNativeMethods.query_capability(1);
_nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
_nativeIX86 = SafeNativeMethods.query_capability((int)ProviderPlatform.x86) > 0;
_nativeX64 = SafeNativeMethods.query_capability((int)ProviderPlatform.x64) > 0;
_nativeIA64 = SafeNativeMethods.query_capability((int)ProviderPlatform.ia64) > 0;
_nativeARM = SafeNativeMethods.query_capability((int)ProviderPlatform.arm) > 0;
_nativeRevision = SafeNativeMethods.query_capability((int)ProviderConfig.Revision);
linearAlgebra = SafeNativeMethods.query_capability((int)ProviderCapability.LinearAlgebra);
}
catch (DllNotFoundException e)

Loading…
Cancel
Save