forked from tsai/mathnet-numerics
Browse Source
Added a new unit test project which is just a copy of the UnitTests-MKL project but with different compilation symbols (NATIVEMKL vs NATIVEOPENBLAS) to control which native provider is loaded. LinearAlgebraProviderTests should probably be in its own project.cuda
committed by
Christoph Ruegg
21 changed files with 2212 additions and 1224 deletions
@ -0,0 +1,77 @@ |
|||||
|
#include "wrapper_common.h" |
||||
|
#include "cblas.h" |
||||
|
|
||||
|
#ifdef __cplusplus |
||||
|
extern "C" { |
||||
|
#endif /* __cplusplus */ |
||||
|
|
||||
|
/*
|
||||
|
Capability is supported if >0 |
||||
|
|
||||
|
Actual number can be increased over time to indicate |
||||
|
extensions/revisions (that do not break compatibility) |
||||
|
*/ |
||||
|
DLLEXPORT int query_capability(const int capability) |
||||
|
{ |
||||
|
switch (capability) |
||||
|
{ |
||||
|
|
||||
|
// SANITY CHECKS
|
||||
|
case 0: return 0; |
||||
|
case 1: return -1; |
||||
|
|
||||
|
// PLATFORM
|
||||
|
case 8: |
||||
|
#ifdef _M_IX86 |
||||
|
return 1; |
||||
|
#else |
||||
|
return 0; |
||||
|
#endif |
||||
|
case 9: |
||||
|
#ifdef _M_X64 |
||||
|
return 1; |
||||
|
#else |
||||
|
return 0; |
||||
|
#endif |
||||
|
case 10: |
||||
|
#ifdef _M_IA64 |
||||
|
return 1; |
||||
|
#else |
||||
|
return 0; |
||||
|
#endif |
||||
|
|
||||
|
// COMMON/SHARED
|
||||
|
case 64: return 7; // revision
|
||||
|
case 66: return 1; // threading control
|
||||
|
|
||||
|
// LINEAR ALGEBRA
|
||||
|
case 128: return 1; // basic dense linear algebra
|
||||
|
|
||||
|
default: return 0; // unknown or not supported
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
DLLEXPORT void set_max_threads(const blasint num_threads) |
||||
|
{ |
||||
|
openblas_set_num_threads(num_threads); |
||||
|
} |
||||
|
|
||||
|
DLLEXPORT char* get_build_config() |
||||
|
{ |
||||
|
return openblas_get_config(); |
||||
|
} |
||||
|
|
||||
|
DLLEXPORT char* get_cpu_core() |
||||
|
{ |
||||
|
return openblas_get_corename(); |
||||
|
} |
||||
|
|
||||
|
DLLEXPORT int get_parallel_type() |
||||
|
{ |
||||
|
return openblas_get_parallel(); |
||||
|
} |
||||
|
|
||||
|
#ifdef __cplusplus |
||||
|
} |
||||
|
#endif /* __cplusplus */ |
||||
@ -0,0 +1,39 @@ |
|||||
|
template <typename _T> |
||||
|
struct complex |
||||
|
{ |
||||
|
_T real, imag; |
||||
|
|
||||
|
complex(_T _real = 0, _T _imag = 0) |
||||
|
{ |
||||
|
real = _real; |
||||
|
imag = _imag; |
||||
|
} |
||||
|
|
||||
|
complex(const complex<_T>& right) |
||||
|
{ |
||||
|
real = right.real; |
||||
|
imag = right.imag; |
||||
|
} |
||||
|
|
||||
|
complex& operator=(const complex& right) |
||||
|
{ |
||||
|
real = right.real; |
||||
|
imag = right.imag; |
||||
|
return *this; |
||||
|
} |
||||
|
|
||||
|
complex& operator=(const _T& right) |
||||
|
{ |
||||
|
real = right; |
||||
|
imag = 0; |
||||
|
return *this; |
||||
|
} |
||||
|
|
||||
|
template<typename _Other> inline |
||||
|
complex& operator=(const complex<_Other>& right) |
||||
|
{ |
||||
|
real = (_T)right.real; |
||||
|
imag = (_T)right.imag; |
||||
|
return *this; |
||||
|
} |
||||
|
}; |
||||
@ -1,367 +0,0 @@ |
|||||
// <copyright file="GotoBlasLinearAlgebraProvider.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2011 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>
|
|
||||
|
|
||||
#if NATIVEGOTO
|
|
||||
|
|
||||
using MathNet.Numerics.Properties; |
|
||||
using System; |
|
||||
using System.Numerics; |
|
||||
using System.Security; |
|
||||
|
|
||||
namespace MathNet.Numerics.Providers.LinearAlgebra.GotoBlas |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// GotoBLAS2 linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
public partial class GotoBlasLinearAlgebraProvider : ManagedLinearAlgebraProvider |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override float MatrixNorm(Norm norm, int rows, int columns, float[] matrix) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
var work = new float[rows]; |
|
||||
return MatrixNorm(norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
||||
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override float MatrixNorm(Norm norm, int rows, int columns, float[] matrix, float[] work) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
if (work.Length < rows) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows), "work"); |
|
||||
} |
|
||||
|
|
||||
return SafeNativeMethods.s_matrix_norm((byte) norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override double MatrixNorm(Norm norm, int rows, int columns, double[] matrix) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
var work = new double[rows]; |
|
||||
return MatrixNorm(norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
||||
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override double MatrixNorm(Norm norm, int rows, int columns, double[] matrix, double[] work) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
if (work.Length < rows) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows), "work"); |
|
||||
} |
|
||||
|
|
||||
return SafeNativeMethods.d_matrix_norm((byte) norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override Complex32 MatrixNorm(Norm norm, int rows, int columns, Complex32[] matrix) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
var work = new float[rows]; |
|
||||
return MatrixNorm(norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
||||
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override Complex32 MatrixNorm(Norm norm, int rows, int columns, Complex32[] matrix, float[] work) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
if (work.Length < rows) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows), "work"); |
|
||||
} |
|
||||
|
|
||||
return SafeNativeMethods.c_matrix_norm((byte) norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override Complex MatrixNorm(Norm norm, int rows, int columns, Complex[] matrix) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
var work = new double[rows]; |
|
||||
return MatrixNorm(norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="norm">The type of norm to compute.</param>
|
|
||||
/// <param name="rows">The number of rows in the matrix.</param>
|
|
||||
/// <param name="columns">The number of columns in the matrix.</param>
|
|
||||
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
||||
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
||||
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
||||
/// <returns>
|
|
||||
/// The requested <see cref="Norm"/> of the matrix.
|
|
||||
/// </returns>
|
|
||||
[SecuritySafeCritical] |
|
||||
public override Complex MatrixNorm(Norm norm, int rows, int columns, Complex[] matrix, double[] work) |
|
||||
{ |
|
||||
if (matrix == null) |
|
||||
{ |
|
||||
throw new ArgumentNullException("matrix"); |
|
||||
} |
|
||||
|
|
||||
if (rows <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "rows"); |
|
||||
} |
|
||||
|
|
||||
if (columns <= 0) |
|
||||
{ |
|
||||
throw new ArgumentException(Resources.ArgumentMustBePositive, "columns"); |
|
||||
} |
|
||||
|
|
||||
if (matrix.Length < rows*columns) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows*columns), "matrix"); |
|
||||
} |
|
||||
|
|
||||
if (work.Length < rows) |
|
||||
{ |
|
||||
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows), "work"); |
|
||||
} |
|
||||
|
|
||||
return SafeNativeMethods.z_matrix_norm((byte) norm, rows, columns, matrix, work); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
#endif
|
|
||||
@ -1,263 +0,0 @@ |
|||||
// <copyright file="SafeNativeMethods.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://mathnet.opensourcedotnet.info
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 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>
|
|
||||
|
|
||||
#if NATIVEGOTO
|
|
||||
|
|
||||
using System.Numerics; |
|
||||
using System.Runtime.InteropServices; |
|
||||
using System.Security; |
|
||||
|
|
||||
namespace MathNet.Numerics.Providers.LinearAlgebra.GotoBlas |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// P/Invoke methods to the native math libraries.
|
|
||||
/// </summary>
|
|
||||
[SuppressUnmanagedCodeSecurity] |
|
||||
[SecurityCritical] |
|
||||
internal static class SafeNativeMethods |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Name of the native DLL.
|
|
||||
/// </summary>
|
|
||||
const string DllName = "MathNET.Numerics.GotoBLAS2.dll"; |
|
||||
|
|
||||
#region BLAS
|
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void s_axpy(int n, float alpha, float[] x, [In, Out] float[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void d_axpy(int n, double alpha, double[] x, [In, Out] double[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void c_axpy(int n, Complex32 alpha, Complex32[] x, [In, Out] Complex32[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void z_axpy(int n, Complex alpha, Complex[] x, [In, Out] Complex[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void s_scale(int n, float alpha, [Out] float[] x); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void d_scale(int n, double alpha, [Out] double[] x); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void c_scale(int n, Complex32 alpha, [In, Out] Complex32[] x); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void z_scale(int n, Complex alpha, [In, Out] Complex[] x); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern float s_dot_product(int n, float[] x, float[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern double d_dot_product(int n, double[] x, double[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern Complex32 c_dot_product(int n, Complex32[] x, Complex32[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern Complex z_dot_product(int n, Complex[] x, Complex[] y); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void s_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, float alpha, float[] x, float[] y, float beta, [In, Out] float[] c); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void d_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, double alpha, double[] x, double[] y, double beta, [In, Out] double[] c); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void c_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, Complex32 alpha, Complex32[] x, Complex32[] y, Complex32 beta, [In, Out] Complex32[] c); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern void z_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, Complex alpha, Complex[] x, Complex[] y, Complex beta, [In, Out] Complex[] c); |
|
||||
|
|
||||
#endregion BLAS
|
|
||||
|
|
||||
#region LAPACK
|
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern float s_matrix_norm(byte norm, int rows, int columns, [In] float[] a, [In, Out] float[] work); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern float d_matrix_norm(byte norm, int rows, int columns, [In] double[] a, [In, Out] double[] work); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern float c_matrix_norm(byte norm, int rows, int columns, [In] Complex32[] a, [In, Out] float[] work); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern double z_matrix_norm(byte norm, int rows, int columns, [In] Complex[] a, [In, Out] double[] work); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_cholesky_factor(int n, [In, Out] float[] a); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_cholesky_factor(int n, [In, Out] double[] a); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_cholesky_factor(int n, [In, Out] Complex32[] a); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_cholesky_factor(int n, [In, Out] Complex[] a); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_lu_factor(int n, [In, Out] float[] a, [In, Out] int[] ipiv); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_lu_factor(int n, [In, Out] double[] a, [In, Out] int[] ipiv); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_lu_factor(int n, [In, Out] Complex32[] a, [In, Out] int[] ipiv); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_lu_factor(int n, [In, Out] Complex[] a, [In, Out] int[] ipiv); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_lu_inverse(int n, [In, Out] float[] a, [In, Out] float[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_lu_inverse(int n, [In, Out] double[] a, [In, Out] double[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_lu_inverse(int n, [In, Out] Complex32[] a, [In, Out] Complex32[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_lu_inverse(int n, [In, Out] Complex[] a, [In, Out] Complex[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_lu_inverse_factored(int n, [In, Out] float[] a, [In, Out] int[] ipiv, [In, Out] float[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_lu_inverse_factored(int n, [In, Out] double[] a, [In, Out] int[] ipiv, [In, Out] double[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_lu_inverse_factored(int n, [In, Out] Complex32[] a, [In, Out] int[] ipiv, [In, Out] Complex32[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_lu_inverse_factored(int n, [In, Out] Complex[] a, [In, Out] int[] ipiv, [In, Out] Complex[] work, int lwork); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_lu_solve_factored(int n, int nrhs, float[] a, [In, Out] int[] ipiv, [In, Out] float[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_lu_solve_factored(int n, int nrhs, double[] a, [In, Out] int[] ipiv, [In, Out] double[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_lu_solve_factored(int n, int nrhs, Complex32[] a, [In, Out] int[] ipiv, [In, Out] Complex32[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_lu_solve_factored(int n, int nrhs, Complex[] a, [In, Out] int[] ipiv, [In, Out] Complex[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_lu_solve(int n, int nrhs, float[] a, [In, Out] float[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_lu_solve(int n, int nrhs, double[] a, [In, Out] double[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_lu_solve(int n, int nrhs, Complex32[] a, [In, Out] Complex32[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_lu_solve(int n, int nrhs, Complex[] a, [In, Out] Complex[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_cholesky_solve(int n, int nrhs, float[] a, [In, Out] float[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_cholesky_solve(int n, int nrhs, double[] a, [In, Out] double[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_cholesky_solve(int n, int nrhs, Complex32[] a, [In, Out] Complex32[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_cholesky_solve(int n, int nrhs, Complex[] a, [In, Out] Complex[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_cholesky_solve_factored(int n, int nrhs, float[] a, [In, Out] float[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_cholesky_solve_factored(int n, int nrhs, double[] a, [In, Out] double[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_cholesky_solve_factored(int n, int nrhs, Complex32[] a, [In, Out] Complex32[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_cholesky_solve_factored(int n, int nrhs, Complex[] a, [In, Out] Complex[] b); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_qr_factor(int m, int n, [In, Out] float[] r, [In, Out] float[] tau, [In, Out] float[] q, [In, Out] float[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_qr_factor(int m, int n, [In, Out] double[] r, [In, Out] double[] tau, [In, Out] double[] q, [In, Out] double[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_qr_factor(int m, int n, [In, Out] Complex32[] r, [In, Out] Complex32[] tau, [In, Out] Complex32[] q, [In, Out] Complex32[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_qr_factor(int m, int n, [In, Out] Complex[] r, [In, Out] Complex[] tau, [In, Out] Complex[] q, [In, Out] Complex[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_qr_solve(int m, int n, int bn, float[] r, float[] b, [In, Out] float[] x, [In, Out] float[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_qr_solve(int m, int n, int bn, double[] r, double[] b, [In, Out] double[] x, [In, Out] double[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_qr_solve(int m, int n, int bn, Complex32[] r, Complex32[] b, [In, Out] Complex32[] x, [In, Out] Complex32[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_qr_solve(int m, int n, int bn, Complex[] r, Complex[] b, [In, Out] Complex[] x, [In, Out] Complex[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_qr_solve_factored(int m, int n, int bn, float[] r, float[] b, float[] tau, [In, Out] float[] x, [In, Out] float[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_qr_solve_factored(int m, int n, int bn, double[] r, double[] b, double[] tau, [In, Out] double[] x, [In, Out] double[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_qr_solve_factored(int m, int n, int bn, Complex32[] r, Complex32[] b, Complex32[] tau, [In, Out] Complex32[] x, [In, Out] Complex32[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_qr_solve_factored(int m, int n, int bn, Complex[] r, Complex[] b, Complex[] tau, [In, Out] Complex[] x, [In, Out] Complex[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int s_svd_factor(bool computeVectors, int m, int n, [In, Out] float[] a, [In, Out] float[] s, [In, Out] float[] u, [In, Out] float[] v, [In, Out] float[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int d_svd_factor(bool computeVectors, int m, int n, [In, Out] double[] a, [In, Out] double[] s, [In, Out] double[] u, [In, Out] double[] v, [In, Out] double[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int c_svd_factor(bool computeVectors, int m, int n, [In, Out] Complex32[] a, [In, Out] Complex32[] s, [In, Out] Complex32[] u, [In, Out] Complex32[] v, [In, Out] Complex32[] work, int len); |
|
||||
|
|
||||
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
|
||||
internal static extern int z_svd_factor(bool computeVectors, int m, int n, [In, Out] Complex[] a, [In, Out] Complex[] s, [In, Out] Complex[] u, [In, Out] Complex[] v, [In, Out] Complex[] work, int len); |
|
||||
|
|
||||
#endregion LAPACK
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
#endif
|
|
||||
@ -0,0 +1,107 @@ |
|||||
|
// <copyright file="OpenBlasLinearAlgebraProvider.cs" company="Math.NET">
|
||||
|
// Math.NET Numerics, part of the Math.NET Project
|
||||
|
// http://numerics.mathdotnet.com
|
||||
|
// http://github.com/mathnet/mathnet-numerics
|
||||
|
// http://mathnetnumerics.codeplex.com
|
||||
|
//
|
||||
|
// Copyright (c) 2009-2015 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>
|
||||
|
|
||||
|
#if NATIVE
|
||||
|
|
||||
|
using MathNet.Numerics.Properties; |
||||
|
using System; |
||||
|
using System.Numerics; |
||||
|
using System.Security; |
||||
|
|
||||
|
namespace MathNet.Numerics.Providers.LinearAlgebra.OpenBlas |
||||
|
{ |
||||
|
public enum ParallelType : int |
||||
|
{ |
||||
|
Sequential = 0, |
||||
|
Thread = 1, |
||||
|
OpenMP = 2 |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// OpenBLAS linear algebra provider.
|
||||
|
/// </summary>
|
||||
|
public partial class OpenBlasLinearAlgebraProvider : ManagedLinearAlgebraProvider |
||||
|
{ |
||||
|
bool _nativeIX86; |
||||
|
bool _nativeX64; |
||||
|
bool _nativeIA64; |
||||
|
bool _nativeARM; |
||||
|
|
||||
|
public OpenBlasLinearAlgebraProvider() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public override void InitializeVerify() |
||||
|
{ |
||||
|
int linearAlgebra; |
||||
|
try |
||||
|
{ |
||||
|
// Load the native library
|
||||
|
NativeProviderLoader.TryLoad(SafeNativeMethods.DllName); |
||||
|
|
||||
|
_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; |
||||
|
|
||||
|
linearAlgebra = SafeNativeMethods.query_capability((int)ProviderCapability.LinearAlgebra); |
||||
|
} |
||||
|
catch (DllNotFoundException e) |
||||
|
{ |
||||
|
throw new NotSupportedException("OpenBLAS Native Provider not found.", e); |
||||
|
} |
||||
|
catch (BadImageFormatException e) |
||||
|
{ |
||||
|
throw new NotSupportedException("OpenBLAS Native Provider found but failed to load. Please verify that the platform matches (x64 vs x32, Windows vs Linux).", e); |
||||
|
} |
||||
|
catch (EntryPointNotFoundException e) |
||||
|
{ |
||||
|
throw new NotSupportedException("OpenBLAS Native Provider does not support capability querying and is therefore not compatible. Consider upgrading to a newer version.", e); |
||||
|
} |
||||
|
|
||||
|
// set threading settings, if supported
|
||||
|
if (SafeNativeMethods.query_capability((int)ProviderConfig.Threading) > 0) |
||||
|
{ |
||||
|
SafeNativeMethods.set_max_threads(Control.MaxDegreeOfParallelism); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public override string ToString() |
||||
|
{ |
||||
|
return string.Format("OpenBLAS\r\nProvider revision: {0}\r\nCPU core name: {1}\r\nLibrary config: {1})", |
||||
|
SafeNativeMethods.query_capability((int)ProviderConfig.Revision), |
||||
|
SafeNativeMethods.get_cpu_core(), |
||||
|
SafeNativeMethods.get_build_config()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endif
|
||||
@ -0,0 +1,303 @@ |
|||||
|
// <copyright file="SafeNativeMethods.cs" company="Math.NET">
|
||||
|
// Math.NET Numerics, part of the Math.NET Project
|
||||
|
// http://mathnet.opensourcedotnet.info
|
||||
|
//
|
||||
|
// Copyright (c) 2009-2010 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>
|
||||
|
|
||||
|
#if NATIVE
|
||||
|
|
||||
|
using System.Numerics; |
||||
|
using System.Runtime.InteropServices; |
||||
|
using System.Security; |
||||
|
|
||||
|
namespace MathNet.Numerics.Providers.LinearAlgebra.OpenBlas |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// P/Invoke methods to the native math libraries.
|
||||
|
/// </summary>
|
||||
|
[SuppressUnmanagedCodeSecurity] |
||||
|
[SecurityCritical] |
||||
|
internal static class SafeNativeMethods |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Name of the native DLL.
|
||||
|
/// </summary>
|
||||
|
const string _DllName = "MathNET.Numerics.OpenBLAS.dll"; |
||||
|
internal static string DllName { get { return _DllName; } } |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int query_capability(int capability); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern string get_build_config(); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern string get_cpu_core(); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern ParallelType get_parallel_type(); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void set_max_threads(int num_threads); |
||||
|
|
||||
|
#region BLAS
|
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void s_axpy(int n, float alpha, float[] x, [In, Out] float[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void d_axpy(int n, double alpha, double[] x, [In, Out] double[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void c_axpy(int n, Complex32 alpha, Complex32[] x, [In, Out] Complex32[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void z_axpy(int n, Complex alpha, Complex[] x, [In, Out] Complex[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void s_scale(int n, float alpha, [Out] float[] x); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void d_scale(int n, double alpha, [Out] double[] x); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void c_scale(int n, Complex32 alpha, [In, Out] Complex32[] x); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void z_scale(int n, Complex alpha, [In, Out] Complex[] x); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern float s_dot_product(int n, float[] x, float[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern double d_dot_product(int n, double[] x, double[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern Complex32 c_dot_product(int n, Complex32[] x, Complex32[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern Complex z_dot_product(int n, Complex[] x, Complex[] y); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void s_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, float alpha, float[] x, float[] y, float beta, [In, Out] float[] c); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void d_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, double alpha, double[] x, double[] y, double beta, [In, Out] double[] c); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void c_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, Complex32 alpha, Complex32[] x, Complex32[] y, Complex32 beta, [In, Out] Complex32[] c); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern void z_matrix_multiply(Transpose transA, Transpose transB, int m, int n, int k, Complex alpha, Complex[] x, Complex[] y, Complex beta, [In, Out] Complex[] c); |
||||
|
|
||||
|
#endregion BLAS
|
||||
|
|
||||
|
#region LAPACK
|
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern float s_matrix_norm(byte norm, int rows, int columns, [In] float[] a, [In, Out] float[] work); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern float d_matrix_norm(byte norm, int rows, int columns, [In] double[] a, [In, Out] double[] work); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern float c_matrix_norm(byte norm, int rows, int columns, [In] Complex32[] a, [In, Out] float[] work); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern double z_matrix_norm(byte norm, int rows, int columns, [In] Complex[] a, [In, Out] double[] work); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_lu_factor(int n, [In, Out] float[] a, [In, Out] int[] ipiv); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_lu_factor(int n, [In, Out] double[] a, [In, Out] int[] ipiv); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_lu_factor(int n, [In, Out] Complex32[] a, [In, Out] int[] ipiv); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_lu_factor(int n, [In, Out] Complex[] a, [In, Out] int[] ipiv); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_lu_inverse(int n, [In, Out] float[] a, [In, Out] float[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_lu_inverse(int n, [In, Out] double[] a, [In, Out] double[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_lu_inverse(int n, [In, Out] Complex32[] a, [In, Out] Complex32[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_lu_inverse(int n, [In, Out] Complex[] a, [In, Out] Complex[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_lu_inverse_factored(int n, [In, Out] float[] a, [In, Out] int[] ipiv, [In, Out] float[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_lu_inverse_factored(int n, [In, Out] double[] a, [In, Out] int[] ipiv, [In, Out] double[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_lu_inverse_factored(int n, [In, Out] Complex32[] a, [In, Out] int[] ipiv, [In, Out] Complex32[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_lu_inverse_factored(int n, [In, Out] Complex[] a, [In, Out] int[] ipiv, [In, Out] Complex[] work, int lwork); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_lu_solve_factored(int n, int nrhs, float[] a, [In, Out] int[] ipiv, [In, Out] float[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_lu_solve_factored(int n, int nrhs, double[] a, [In, Out] int[] ipiv, [In, Out] double[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_lu_solve_factored(int n, int nrhs, Complex32[] a, [In, Out] int[] ipiv, [In, Out] Complex32[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_lu_solve_factored(int n, int nrhs, Complex[] a, [In, Out] int[] ipiv, [In, Out] Complex[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_lu_solve(int n, int nrhs, float[] a, [In, Out] float[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_lu_solve(int n, int nrhs, double[] a, [In, Out] double[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_lu_solve(int n, int nrhs, Complex32[] a, [In, Out] Complex32[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_lu_solve(int n, int nrhs, Complex[] a, [In, Out] Complex[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_cholesky_factor(int n, [In, Out] float[] a); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_cholesky_factor(int n, [In, Out] double[] a); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_cholesky_factor(int n, [In, Out] Complex32[] a); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_cholesky_factor(int n, [In, Out] Complex[] a); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_cholesky_solve(int n, int nrhs, float[] a, [In, Out] float[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_cholesky_solve(int n, int nrhs, double[] a, [In, Out] double[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_cholesky_solve(int n, int nrhs, Complex32[] a, [In, Out] Complex32[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_cholesky_solve(int n, int nrhs, Complex[] a, [In, Out] Complex[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_cholesky_solve_factored(int n, int nrhs, float[] a, [In, Out] float[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_cholesky_solve_factored(int n, int nrhs, double[] a, [In, Out] double[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_cholesky_solve_factored(int n, int nrhs, Complex32[] a, [In, Out] Complex32[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_cholesky_solve_factored(int n, int nrhs, Complex[] a, [In, Out] Complex[] b); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_qr_factor(int m, int n, [In, Out] float[] r, [In, Out] float[] tau, [In, Out] float[] q, [In, Out] float[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_qr_thin_factor(int m, int n, [In, Out] float[] q, [In, Out] float[] tau, [In, Out] float[] r, [In, Out] float[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_qr_factor(int m, int n, [In, Out] double[] r, [In, Out] double[] tau, [In, Out] double[] q, [In, Out] double[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_qr_thin_factor(int m, int n, [In, Out] double[] q, [In, Out] double[] tau, [In, Out] double[] r, [In, Out] double[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_qr_factor(int m, int n, [In, Out] Complex32[] r, [In, Out] Complex32[] tau, [In, Out] Complex32[] q, [In, Out] Complex32[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_qr_thin_factor(int m, int n, [In, Out] Complex32[] q, [In, Out] Complex32[] tau, [In, Out] Complex32[] r, [In, Out] Complex32[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_qr_factor(int m, int n, [In, Out] Complex[] r, [In, Out] Complex[] tau, [In, Out] Complex[] q, [In, Out] Complex[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_qr_thin_factor(int m, int n, [In, Out] Complex[] q, [In, Out] Complex[] tau, [In, Out] Complex[] r, [In, Out] Complex[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_qr_solve(int m, int n, int bn, float[] r, float[] b, [In, Out] float[] x, [In, Out] float[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_qr_solve(int m, int n, int bn, double[] r, double[] b, [In, Out] double[] x, [In, Out] double[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_qr_solve(int m, int n, int bn, Complex32[] r, Complex32[] b, [In, Out] Complex32[] x, [In, Out] Complex32[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_qr_solve(int m, int n, int bn, Complex[] r, Complex[] b, [In, Out] Complex[] x, [In, Out] Complex[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_qr_solve_factored(int m, int n, int bn, float[] r, float[] b, float[] tau, [In, Out] float[] x, [In, Out] float[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_qr_solve_factored(int m, int n, int bn, double[] r, double[] b, double[] tau, [In, Out] double[] x, [In, Out] double[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_qr_solve_factored(int m, int n, int bn, Complex32[] r, Complex32[] b, Complex32[] tau, [In, Out] Complex32[] x, [In, Out] Complex32[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_qr_solve_factored(int m, int n, int bn, Complex[] r, Complex[] b, Complex[] tau, [In, Out] Complex[] x, [In, Out] Complex[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_svd_factor(bool computeVectors, int m, int n, [In, Out] float[] a, [In, Out] float[] s, [In, Out] float[] u, [In, Out] float[] v, [In, Out] float[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_svd_factor(bool computeVectors, int m, int n, [In, Out] double[] a, [In, Out] double[] s, [In, Out] double[] u, [In, Out] double[] v, [In, Out] double[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_svd_factor(bool computeVectors, int m, int n, [In, Out] Complex32[] a, [In, Out] Complex32[] s, [In, Out] Complex32[] u, [In, Out] Complex32[] v, [In, Out] Complex32[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_svd_factor(bool computeVectors, int m, int n, [In, Out] Complex[] a, [In, Out] Complex[] s, [In, Out] Complex[] u, [In, Out] Complex[] v, [In, Out] Complex[] work, int len); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int s_eigen(bool isSymmetric, int n, [In, Out] float[] a, [In, Out] float[] vectors, [In, Out] Complex[] values, [In, Out] float[] d); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int d_eigen(bool isSymmetric, int n, [In, Out] double[] a, [In, Out] double[] vectors, [In, Out] Complex[] values, [In, Out] double[] d); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int c_eigen(bool isSymmetric, int n, [In, Out] Complex32[] a, [In, Out] Complex32[] vectors, [In, Out] Complex[] values, [In, Out] Complex32[] d); |
||||
|
|
||||
|
[DllImport(_DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)] |
||||
|
internal static extern int z_eigen(bool isSymmetric, int n, [In, Out] Complex[] a, [In, Out] Complex[] vectors, [In, Out] Complex[] values, [In, Out] Complex[] d); |
||||
|
|
||||
|
#endregion LAPACK
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endif
|
||||
@ -0,0 +1,55 @@ |
|||||
|
// <copyright file="ProviderCapabilities.cs" company="Math.NET">
|
||||
|
// Math.NET Numerics, part of the Math.NET Project
|
||||
|
// http://numerics.mathdotnet.com
|
||||
|
// http://github.com/mathnet/mathnet-numerics
|
||||
|
// http://mathnetnumerics.codeplex.com
|
||||
|
//
|
||||
|
// Copyright (c) 2009-2015 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>
|
||||
|
|
||||
|
namespace MathNet.Numerics.Providers.LinearAlgebra |
||||
|
{ |
||||
|
public enum ProviderPlatform : int |
||||
|
{ |
||||
|
x86 = 8, |
||||
|
x64 = 9, |
||||
|
ia64 = 10, |
||||
|
arm = 11, |
||||
|
} |
||||
|
|
||||
|
public enum ProviderConfig : int |
||||
|
{ |
||||
|
Revision = 64, |
||||
|
Precision = 65, |
||||
|
Threading = 66, |
||||
|
Memory = 67, |
||||
|
} |
||||
|
|
||||
|
public enum ProviderCapability : int |
||||
|
{ |
||||
|
LinearAlgebra = 128, |
||||
|
Optimization = 256, |
||||
|
FFT = 384, |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,351 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<PropertyGroup> |
||||
|
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion> |
||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
|
<ProductVersion>8.0.30703</ProductVersion> |
||||
|
<SchemaVersion>2.0</SchemaVersion> |
||||
|
<ProjectGuid>{96B903EF-3EE1-4569-803C-0482D2F5ED37}</ProjectGuid> |
||||
|
<OutputType>Library</OutputType> |
||||
|
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
|
<RootNamespace>MathNet.Numerics.UnitTests</RootNamespace> |
||||
|
<AssemblyName>MathNet.Numerics.UnitTestsOpenBLAS</AssemblyName> |
||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
||||
|
<FileAlignment>512</FileAlignment> |
||||
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
||||
|
<DefineConstants>TRACE;NATIVE;NATIVEOPENBLAS;</DefineConstants> |
||||
|
<OutputPath>..\..\out\OpenBLAS\Windows\</OutputPath> |
||||
|
<IntermediateOutputPath>..\..\obj\OpenBLAS\Windows\AnyCPU\</IntermediateOutputPath> |
||||
|
<BaseIntermediateOutputPath>..\..\obj\OpenBLAS\Windows\AnyCPU\</BaseIntermediateOutputPath> |
||||
|
<Optimize>true</Optimize> |
||||
|
<DebugType>pdbonly</DebugType> |
||||
|
<ErrorReport>prompt</ErrorReport> |
||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
||||
|
<NoWarn>1591</NoWarn> |
||||
|
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
||||
|
<DefineConstants>TRACE;DEBUG;NATIVE;NATIVEOPENBLAS;</DefineConstants> |
||||
|
<OutputPath>..\..\out\OpenBLAS\Windows\</OutputPath> |
||||
|
<IntermediateOutputPath>..\..\obj\OpenBLAS\Windows\AnyCPU\</IntermediateOutputPath> |
||||
|
<BaseIntermediateOutputPath>..\..\obj\OpenBLAS\Windows\AnyCPU\</BaseIntermediateOutputPath> |
||||
|
<Optimize>false</Optimize> |
||||
|
<DebugType>full</DebugType> |
||||
|
<DebugSymbols>true</DebugSymbols> |
||||
|
<ErrorReport>prompt</ErrorReport> |
||||
|
<WarningLevel>4</WarningLevel> |
||||
|
<NoWarn>1591</NoWarn> |
||||
|
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
|
</PropertyGroup> |
||||
|
<ItemGroup> |
||||
|
<Reference Include="System" /> |
||||
|
<Reference Include="System" /> |
||||
|
<Reference Include="System.Core" /> |
||||
|
<Reference Include="System.Numerics" /> |
||||
|
<Reference Include="System.Xml.Linq" /> |
||||
|
<Reference Include="System.Data.DataSetExtensions" /> |
||||
|
<Reference Include="Microsoft.CSharp" /> |
||||
|
<Reference Include="System.Data" /> |
||||
|
<Reference Include="System.Xml" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<Compile Include="**\*.cs" Exclude="Properties\Settings.Designer.cs"> |
||||
|
</Compile> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<None Include="..\..\data\Codeplex-5667.csv"> |
||||
|
<Link>data\Codeplex-5667.csv</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Github-Cureos-1.csv"> |
||||
|
<Link>data\Github-Cureos-1.csv</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\A.mat"> |
||||
|
<Link>data\Matlab\A.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\collection-nocompress.mat"> |
||||
|
<Link>data\Matlab\collection-nocompress.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\collection.mat"> |
||||
|
<Link>data\Matlab\collection.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\complex.mat"> |
||||
|
<Link>data\Matlab\complex.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\sparse-large.mat"> |
||||
|
<Link>data\Matlab\sparse-large.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\sparse-small.mat"> |
||||
|
<Link>data\Matlab\sparse-small.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\sparse_complex.mat"> |
||||
|
<Link>data\Matlab\sparse_complex.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\Matlab\v.mat"> |
||||
|
<Link>data\Matlab\v.mat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\AtmWtAgt.dat"> |
||||
|
<Link>data\NIST\AtmWtAgt.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Bennett5.dat"> |
||||
|
<Link>data\NIST\Bennett5.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\BoxBOD.dat"> |
||||
|
<Link>data\NIST\BoxBOD.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Chwirut1.dat"> |
||||
|
<Link>data\NIST\Chwirut1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Chwirut2.dat"> |
||||
|
<Link>data\NIST\Chwirut2.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\DanWood.dat"> |
||||
|
<Link>data\NIST\DanWood.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Eckerle4.dat"> |
||||
|
<Link>data\NIST\Eckerle4.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\ENSO.dat"> |
||||
|
<Link>data\NIST\ENSO.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Filip.dat"> |
||||
|
<Link>data\NIST\Filip.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Gauss1.dat"> |
||||
|
<Link>data\NIST\Gauss1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Gauss2.dat"> |
||||
|
<Link>data\NIST\Gauss2.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Gauss3.dat"> |
||||
|
<Link>data\NIST\Gauss3.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Hahn1.dat"> |
||||
|
<Link>data\NIST\Hahn1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Kirby2.dat"> |
||||
|
<Link>data\NIST\Kirby2.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Lanczos1.dat"> |
||||
|
<Link>data\NIST\Lanczos1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Lanczos2.dat"> |
||||
|
<Link>data\NIST\Lanczos2.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Lanczos3.dat"> |
||||
|
<Link>data\NIST\Lanczos3.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Lew.dat"> |
||||
|
<Link>data\NIST\Lew.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Longley.dat"> |
||||
|
<Link>data\NIST\Longley.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Lottery.dat"> |
||||
|
<Link>data\NIST\Lottery.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Mavro.dat"> |
||||
|
<Link>data\NIST\Mavro.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\MGH09.dat"> |
||||
|
<Link>data\NIST\MGH09.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\MGH10.dat"> |
||||
|
<Link>data\NIST\MGH10.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\MGH17.dat"> |
||||
|
<Link>data\NIST\MGH17.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Michelso.dat"> |
||||
|
<Link>data\NIST\Michelso.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Misra1a.dat"> |
||||
|
<Link>data\NIST\Misra1a.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Misra1b.dat"> |
||||
|
<Link>data\NIST\Misra1b.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Misra1c.dat"> |
||||
|
<Link>data\NIST\Misra1c.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Misra1d.dat"> |
||||
|
<Link>data\NIST\Misra1d.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Nelson.dat"> |
||||
|
<Link>data\NIST\Nelson.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\NoInt1.dat"> |
||||
|
<Link>data\NIST\NoInt1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\NoInt2.dat"> |
||||
|
<Link>data\NIST\NoInt2.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Norris.dat"> |
||||
|
<Link>data\NIST\Norris.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\NumAcc1.dat"> |
||||
|
<Link>data\NIST\NumAcc1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\NumAcc2.dat"> |
||||
|
<Link>data\NIST\NumAcc2.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\NumAcc3.dat"> |
||||
|
<Link>data\NIST\NumAcc3.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\NumAcc4.dat"> |
||||
|
<Link>data\NIST\NumAcc4.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Pontius.dat"> |
||||
|
<Link>data\NIST\Pontius.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Rat42.dat"> |
||||
|
<Link>data\NIST\Rat42.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Rat43.dat"> |
||||
|
<Link>data\NIST\Rat43.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Roszman1.dat"> |
||||
|
<Link>data\NIST\Roszman1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SiRstvt.dat"> |
||||
|
<Link>data\NIST\SiRstvt.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs01t.dat"> |
||||
|
<Link>data\NIST\SmLs01t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs02t.dat"> |
||||
|
<Link>data\NIST\SmLs02t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs03t.dat"> |
||||
|
<Link>data\NIST\SmLs03t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs04t.dat"> |
||||
|
<Link>data\NIST\SmLs04t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs05t.dat"> |
||||
|
<Link>data\NIST\SmLs05t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs06t.dat"> |
||||
|
<Link>data\NIST\SmLs06t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs07t.dat"> |
||||
|
<Link>data\NIST\SmLs07t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs08t.dat"> |
||||
|
<Link>data\NIST\SmLs08t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\SmLs09t.dat"> |
||||
|
<Link>data\NIST\SmLs09t.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Thurber.dat"> |
||||
|
<Link>data\NIST\Thurber.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Wampler1.dat"> |
||||
|
<Link>data\NIST\Wampler1.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Wampler2.dat"> |
||||
|
<Link>data\NIST\Wampler2.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Wampler3.dat"> |
||||
|
<Link>data\NIST\Wampler3.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Wampler4.dat"> |
||||
|
<Link>data\NIST\Wampler4.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="..\..\data\NIST\Wampler5.dat"> |
||||
|
<Link>data\NIST\Wampler5.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="App.config" /> |
||||
|
<None Include="..\..\data\NIST\Meixner.dat"> |
||||
|
<Link>data\NIST\Meixner.dat</Link> |
||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
|
</None> |
||||
|
<None Include="paket.references" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\Numerics\Numerics.csproj"> |
||||
|
<Project>{b7cae5f4-a23f-4438-b5be-41226618b695}</Project> |
||||
|
<Name>Numerics</Name> |
||||
|
</ProjectReference> |
||||
|
</ItemGroup> |
||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
||||
|
<ItemGroup> |
||||
|
<Reference Include="nunit.framework"> |
||||
|
<HintPath>..\..\packages\NUnit\lib\nunit.framework.dll</HintPath> |
||||
|
<Private>True</Private> |
||||
|
<Paket>True</Paket> |
||||
|
</Reference> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> |
||||
|
</ItemGroup> |
||||
|
</Project> |
||||
Loading…
Reference in new issue