Browse Source

removed t4 templates

la-knuth
Marcus Cuda 16 years ago
parent
commit
960149224f
  1. 4
      .gitignore
  2. 36
      build/t4.bat
  3. 55
      src/FSharp/AssemblyInfo.tt
  4. 3
      src/MathNet.Numerics.5.1.ReSharper
  5. 7
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Common.tt
  6. 1089
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex.cs
  7. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex.tt
  8. 1096
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex32.cs
  9. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex32.tt
  10. 1093
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.double.cs
  11. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.double.tt
  12. 1092
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.float.cs
  13. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.float.tt
  14. 18
      src/Numerics/Algorithms/LinearAlgebra/Acml/SafeNativeMethods.cs
  15. 8
      src/Numerics/Algorithms/LinearAlgebra/Acml/SafeNativeMethods.tt
  16. 48
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Common.cs
  17. 8
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Common.tt
  18. 214
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex.cs
  19. 12
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex.tt
  20. 1064
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex32.cs
  21. 12
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex32.tt
  22. 1064
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.double.cs
  23. 12
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.double.tt
  24. 1064
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.float.cs
  25. 12
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.float.tt
  26. 259
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/SafeNativeMethods.cs
  27. 8
      src/Numerics/Algorithms/LinearAlgebra/GotoBlas/SafeNativeMethods.tt
  28. 363
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Common.cs
  29. 8
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Common.tt
  30. 1233
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex.cs
  31. 14
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex.tt
  32. 1232
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex32.cs
  33. 14
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex32.tt
  34. 1232
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.double.cs
  35. 14
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.double.tt
  36. 1236
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.float.cs
  37. 14
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.float.tt
  38. 311
      src/Numerics/Algorithms/LinearAlgebra/Mkl/SafeNativeMethods.cs
  39. 9
      src/Numerics/Algorithms/LinearAlgebra/Mkl/SafeNativeMethods.tt
  40. 27
      src/Numerics/Algorithms/LinearAlgebra/native.dotproduct.include
  41. 2
      src/Numerics/Algorithms/LinearAlgebra/native.footer.include
  42. 46
      src/Numerics/Algorithms/LinearAlgebra/native.header.include
  43. 139
      src/Numerics/Algorithms/LinearAlgebra/native.vector.include
  44. 52
      src/Numerics/Algorithms/LinearAlgebra/safe.native.vector.include
  45. 194
      src/Numerics/Numerics.csproj
  46. 2
      src/Numerics/Properties/AssemblyInfo.cs
  47. 38
      src/Numerics/Version.tt

4
.gitignore

@ -10,8 +10,4 @@ _ReSharper*
bin
*.vsdoc
*.XML
Version1.cs
src/Numerics/Algorithms/LinearAlgebra/Mkl/*.cs
src/Numerics/Algorithms/LinearAlgebra/Acml/*.cs
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/*.cs
out

36
build/t4.bat

@ -1,36 +0,0 @@
IF DEFINED CommonProgramFiles(x86) GOTO x64
:x86
SET common=%CommonProgramFiles%
GOTO prepare
:x64
SET common=%CommonProgramFiles(x86)%
GOTO prepare
:prepare
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Version.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Version.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Silverlight\Version.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Silverlight\Version.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Common.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Common.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex32.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex32.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.double.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.double.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.float.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.float.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\SafeNativeMethods.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Mkl\SafeNativeMethods.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Common.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Common.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex32.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex32.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.double.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.double.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.float.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.float.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\SafeNativeMethods.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\GotoBlas\SafeNativeMethods.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Common.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Common.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex32.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex32.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.double.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.double.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.float.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.float.tt
"%common%\Microsoft Shared\TextTemplating\10.0\texttransform.exe" -out ..\src\Numerics\Algorithms\LinearAlgebra\Acml\SafeNativeMethods.cs -P "%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5" ..\src\Numerics\Algorithms\LinearAlgebra\Acml\SafeNativeMethods.tt
set common =

55
src/FSharp/AssemblyInfo.tt

@ -1,55 +0,0 @@
// <copyright file="AssemblyInfo.fs" 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 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
open System.Reflection
open System.Resources;
open System.Runtime.CompilerServices
open System.Runtime.InteropServices
[<assembly: AssemblyTitle("Math.NET Numerics F# Modules")>]
[<assembly: AssemblyDescription("")>]
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("Math.NET Project")>]
[<assembly: AssemblyProduct("Math.NET Numerics")>]
[<assembly: AssemblyCopyright("Copyright © Math.NET Project")>]
[<assembly: AssemblyTrademark("")>]
[<assembly: AssemblyCulture("")>]
[<assembly: ComVisible(false)>]
[<assembly: Guid("048BC4EB-CE2B-4040-9967-4784F5405B0F")>]
[<assembly: NeutralResourcesLanguage("en")>]
<#@ template Language="C#"#>
<# DateTime date = DateTime.UtcNow; #>
[<assembly: AssemblyVersion("<#=date.Year#>.<#=date.Month.ToString("0#")#>.<#=date.Day#>.<#=(int)date.TimeOfDay.TotalMinutes#>")>]
[<assembly: AssemblyFileVersion("<#=date.Year#>.<#=date.Month.ToString("0#")#>.<#=date.Day#>.<#=(int)date.TimeOfDay.TotalMinutes#>")>]
()

3
src/MathNet.Numerics.5.1.ReSharper

@ -87,7 +87,8 @@ Silverlight
namespace
da
Dont
Blas</UserWords>
Blas
Acml</UserWords>
</CustomDictionary>
</Dictionaries>
</CustomDictionaries>

7
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Common.tt

@ -1,7 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Acml";#>
<# string title = "AMD Core Math Library (ACML)";#>
<# string dataType = "Common";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.footer.include" #>

1089
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex.cs

File diff suppressed because it is too large

13
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex.tt

@ -1,13 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Acml";#>
<# string title = "AMD Core Math Library (ACML)";#>
<# string dataType = "Complex";#>
<# string zero = "Complex.Zero";#>
<# string one = "Complex.One";#>
<# string prefix = "z";#>
<# string svd_work = "2 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

1096
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex32.cs

File diff suppressed because it is too large

13
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex32.tt

@ -1,13 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Acml";#>
<# string title = "AMD Core Math Library (ACML)";#>
<# string dataType = "Complex32";#>
<# string zero = "Complex32.Zero";#>
<# string one = "Complex32.One";#>
<# string prefix = "c";#>
<# string svd_work = "2 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

1093
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.double.cs

File diff suppressed because it is too large

13
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.double.tt

@ -1,13 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Acml";#>
<# string title = "AMD Core Math Library (ACML)";#>
<# string dataType = "double";#>
<# string zero = "0.0";#>
<# string one = "1.0";#>
<# string prefix = "d";#>
<# string svd_work = "Math.Max((3 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA), 5 * Math.Min(rowsA, columnsA))";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

1092
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.float.cs

File diff suppressed because it is too large

13
src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.float.tt

@ -1,13 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Acml";#>
<# string title = "AMD Core Math Library (ACML)";#>
<# string dataType = "float";#>
<# string zero = "0.0f";#>
<# string one = "1.0f";#>
<# string prefix = "s";#>
<# string svd_work = "Math.Max((3 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)), 5 * Math.Min(rowsA, columnsA))";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

18
src/Numerics/Algorithms/LinearAlgebra/safe.native.common.include → src/Numerics/Algorithms/LinearAlgebra/Acml/SafeNativeMethods.cs

@ -26,15 +26,11 @@
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
/* This file is automatically generated - do not modify it.
Last generated on UTC <#=DateTime.UtcNow.ToString("u")#>
*/
using System.Numerics;
using System.Runtime.InteropServices;
using System.Security;
namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#= namespaceSuffix #>
namespace MathNet.Numerics.Algorithms.LinearAlgebra.Acml
{
/// <summary>
/// P/Invoke methods to the native math libraries.
@ -46,7 +42,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#= namespaceSuffix #>
/// <summary>
/// Name of the native DLL.
/// </summary>
private const string DllName = "MathNET.Numerics.<#=library#>.dll";
private const string DllName = "MathNET.Numerics.ACML.dll";
#region BLAS
@ -247,15 +243,17 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#= namespaceSuffix #>
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 compute_vectors, 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);
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 compute_vectors, 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);
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 compute_vectors, 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);
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 compute_vectors, 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);
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
}
}

8
src/Numerics/Algorithms/LinearAlgebra/Acml/SafeNativeMethods.tt

@ -1,8 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string namespaceSuffix = "Acml";
string library = "ACML";
#>
<#@ include file="..\safe.native.common.include" #>
}
}

48
src/Numerics/Algorithms/LinearAlgebra/native.norm.include → src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Common.cs

@ -1,4 +1,46 @@
 /// <summary>
// <copyright file="GotoBlasLinearAlgebraProvider.Common.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>
namespace MathNet.Numerics.Algorithms.LinearAlgebra.GotoBlas
{
using System;
using System.Numerics;
using System.Security;
using Properties;
/// <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>
@ -316,4 +358,6 @@
}
return SafeNativeMethods.z_matrix_norm((byte)norm, rows, columns, matrix, work);
}
}
}
}

8
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Common.tt

@ -1,8 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "GotoBlas";#>
<# string title = "GotoBLAS2";#>
<# string dataType = "Common";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.norm.include" #>
<#@ include file="..\native.footer.include" #>

214
src/Numerics/Algorithms/LinearAlgebra/native.generic.include → src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex.cs

@ -1,4 +1,46 @@
 /// <summary>
// <copyright file="GotoBlasLinearAlgebraProvider.Complex.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>
namespace MathNet.Numerics.Algorithms.LinearAlgebra.GotoBlas
{
using System;
using System.Numerics;
using System.Security;
using Properties;
/// <summary>
/// GotoBLAS2 linear algebra provider.
/// </summary>
public partial class GotoBlasLinearAlgebraProvider
{
/// <summary>
/// Adds a scaled vector to another: <c>result = y + alpha*x</c>.
/// </summary>
/// <param name="y">The vector to update.</param>
@ -7,7 +49,7 @@
/// <param name="result">The result of the addition.</param>
/// <remarks>This is similar to the AXPY BLAS routine.</remarks>
[SecuritySafeCritical]
public override void AddVectorToScaledVector(<#=dataType#>[] y, <#=dataType#> alpha, <#=dataType#>[] x, <#=dataType#>[] result)
public override void AddVectorToScaledVector(Complex[] y, Complex alpha, Complex[] x, Complex[] result)
{
if (y == null)
{
@ -29,12 +71,12 @@
Array.Copy(y, 0, result, 0, y.Length);
}
if (alpha == <#=zero#>)
if (alpha == Complex.Zero)
{
return;
}
SafeNativeMethods.<#=prefix#>_axpy(y.Length, alpha, x, result);
SafeNativeMethods.z_axpy(y.Length, alpha, x, result);
}
/// <summary>
@ -45,7 +87,7 @@
/// <param name="result">This result of the scaling.</param>
/// <remarks>This is similar to the SCAL BLAS routine.</remarks>
[SecuritySafeCritical]
public override void ScaleArray(<#=dataType#> alpha, <#=dataType#>[] x, <#=dataType#>[] result)
public override void ScaleArray(Complex alpha, Complex[] x, Complex[] result)
{
if (x == null)
{
@ -57,12 +99,12 @@
Array.Copy(x, 0, result, 0, x.Length);
}
if (alpha == <#=one#>)
if (alpha == Complex.One)
{
return;
}
SafeNativeMethods.<#=prefix#>_scale(x.Length, alpha, result);
SafeNativeMethods.z_scale(x.Length, alpha, result);
}
/// <summary>
@ -76,10 +118,10 @@
/// <param name="columnsY">The number of columns in the y matrix.</param>
/// <param name="result">Where to store the result of the multiplication.</param>
/// <remarks>This is a simplified version of the BLAS GEMM routine with alpha
/// set to <#=one#> and beta set to <#=zero#>, and x and y are not transposed.</remarks>
public override void MatrixMultiply(<#=dataType#>[] x, int rowsX, int columnsX, <#=dataType#>[] y, int rowsY, int columnsY, <#=dataType#>[] result)
/// set to Complex.One and beta set to Complex.Zero, and x and y are not transposed.</remarks>
public override void MatrixMultiply(Complex[] x, int rowsX, int columnsX, Complex[] y, int rowsY, int columnsY, Complex[] result)
{
MatrixMultiplyWithUpdate(Transpose.DontTranspose, Transpose.DontTranspose, <#=one#>, x, rowsX, columnsX, y, rowsY, columnsY, <#=zero#>, result);
MatrixMultiplyWithUpdate(Transpose.DontTranspose, Transpose.DontTranspose, Complex.One, x, rowsX, columnsX, y, rowsY, columnsY, Complex.Zero, result);
}
/// <summary>
@ -97,7 +139,7 @@
/// <param name="beta">The value to scale the <paramref name="c"/> matrix.</param>
/// <param name="c">The c matrix.</param>
[SecuritySafeCritical]
public override void MatrixMultiplyWithUpdate(Transpose transposeA, Transpose transposeB, <#=dataType#> alpha, <#=dataType#>[] a, int rowsA, int columnsA, <#=dataType#>[] b, int rowsB, int columnsB, <#=dataType#> beta, <#=dataType#>[] c)
public override void MatrixMultiplyWithUpdate(Transpose transposeA, Transpose transposeB, Complex alpha, Complex[] a, int rowsA, int columnsA, Complex[] b, int rowsB, int columnsB, Complex beta, Complex[] c)
{
if (a == null)
{
@ -129,20 +171,20 @@
throw new ArgumentException(Resources.ArgumentMatrixDimensions);
}
SafeNativeMethods.<#=prefix#>_matrix_multiply(transposeA, transposeB, m, n, k, alpha, a, b, beta, c);
SafeNativeMethods.z_matrix_multiply(transposeA, transposeB, m, n, k, alpha, a, b, beta, c);
}
/// <summary>
/// Computes the LUP factorization of A. P*A = L*U.
/// </summary>
/// <param name="data">An <paramref name="order"/> by <paramref name="order"/> matrix. The matrix is overwritten with the
/// the LU factorization on exit. The lower triangular factor L is stored in under the diagonal of <paramref name="data"/> (the diagonal is always <#=one#>
/// the LU factorization on exit. The lower triangular factor L is stored in under the diagonal of <paramref name="data"/> (the diagonal is always Complex.One
/// for the L factor). The upper triangular factor U is stored on and above the diagonal of <paramref name="data"/>.</param>
/// <param name="order">The order of the square matrix <paramref name="data"/>.</param>
/// <param name="ipiv">On exit, it contains the pivot indices. The size of the array must be <paramref name="order"/>.</param>
/// <remarks>This is equivalent to the GETRF LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUFactor(<#=dataType#>[] data, int order, int[] ipiv)
public override void LUFactor(Complex[] data, int order, int[] ipiv)
{
if (data == null)
{
@ -164,7 +206,7 @@
throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
}
SafeNativeMethods.<#=prefix#>_lu_factor(order, data, ipiv);
SafeNativeMethods.z_lu_factor(order, data, ipiv);
}
/// <summary>
@ -174,7 +216,7 @@
/// <param name="order">The order of the square matrix <paramref name="a"/>.</param>
/// <remarks>This is equivalent to the GETRF and GETRI LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void LUInverse(<#=dataType#>[] a, int order)
public override void LUInverse(Complex[] a, int order)
{
if (a == null)
{
@ -186,19 +228,8 @@
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
var work = new <#=dataType#>[order];
<# if (dataType == "float") { #>
if (Control.LinearAlgebraProvider is Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider)
{
new ManagedLinearAlgebraProvider().LUInverse(a, order, work);
}
else
{
SafeNativeMethods.s_lu_inverse(order, a, work, work.Length);
}
<# } else{#>
SafeNativeMethods.<#=prefix#>_lu_inverse(order, a, work, work.Length);
<# } #>
var work = new Complex[order];
SafeNativeMethods.z_lu_inverse(order, a, work, work.Length);
}
/// <summary>
@ -209,7 +240,7 @@
/// <param name="ipiv">The pivot indices of <paramref name="a"/>.</param>
/// <remarks>This is equivalent to the GETRI LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUInverseFactored(<#=dataType#>[] a, int order, int[] ipiv)
public override void LUInverseFactored(Complex[] a, int order, int[] ipiv)
{
if (a == null)
{
@ -231,19 +262,8 @@
throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
}
var work = new <#=dataType#>[order];
<# if (dataType == "float") { #>
if (Control.LinearAlgebraProvider is Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider)
{
new ManagedLinearAlgebraProvider().LUInverseFactored(a, order, ipiv, work);
}
else
{
SafeNativeMethods.s_lu_inverse_factored(order, a, ipiv, work, order);
}
<# }else{ #>
SafeNativeMethods.<#=prefix#>_lu_inverse_factored(order, a, ipiv, work, order);
<# } #>
var work = new Complex[order];
SafeNativeMethods.z_lu_inverse_factored(order, a, ipiv, work, order);
}
/// <summary>
@ -256,7 +276,7 @@
/// work size value.</param>
/// <remarks>This is equivalent to the GETRF and GETRI LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void LUInverse(<#=dataType#>[] a, int order, <#=dataType#>[] work)
public override void LUInverse(Complex[] a, int order, Complex[] work)
{
if (a == null)
{
@ -278,18 +298,7 @@
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
<# if (dataType == "float") { #>
if (Control.LinearAlgebraProvider is Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider)
{
new ManagedLinearAlgebraProvider().LUInverse(a, order, work);
}
else
{
SafeNativeMethods.s_lu_inverse(order, a, work, work.Length);
}
<# } else{#>
SafeNativeMethods.<#=prefix#>_lu_inverse(order, a, work, work.Length);
<# } #>
SafeNativeMethods.z_lu_inverse(order, a, work, work.Length);
}
/// <summary>
@ -303,7 +312,7 @@
/// work size value.</param>
/// <remarks>This is equivalent to the GETRI LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUInverseFactored(<#=dataType#>[] a, int order, int[] ipiv, <#=dataType#>[] work)
public override void LUInverseFactored(Complex[] a, int order, int[] ipiv, Complex[] work)
{
if (a == null)
{
@ -335,18 +344,7 @@
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
<# if (dataType == "float") { #>
if (Control.LinearAlgebraProvider is Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider)
{
new ManagedLinearAlgebraProvider().LUInverseFactored(a, order, ipiv, work);
}
else
{
SafeNativeMethods.s_lu_inverse_factored(order, a, ipiv, work, order);
}
<# }else{ #>
SafeNativeMethods.<#=prefix#>_lu_inverse_factored(order, a, ipiv, work, order);
<# } #>
SafeNativeMethods.z_lu_inverse_factored(order, a, ipiv, work, order);
}
/// <summary>
@ -358,7 +356,7 @@
/// <param name="b">On entry the B matrix; on exit the X matrix.</param>
/// <remarks>This is equivalent to the GETRF and GETRS LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void LUSolve(int columnsOfB, <#=dataType#>[] a, int order, <#=dataType#>[] b)
public override void LUSolve(int columnsOfB, Complex[] a, int order, Complex[] b)
{
if (a == null)
{
@ -380,7 +378,7 @@
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.<#=prefix#>_lu_solve(order, columnsOfB, a, b);
SafeNativeMethods.z_lu_solve(order, columnsOfB, a, b);
}
/// <summary>
@ -393,7 +391,7 @@
/// <param name="b">On entry the B matrix; on exit the X matrix.</param>
/// <remarks>This is equivalent to the GETRS LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUSolveFactored(int columnsOfB, <#=dataType#>[] a, int order, int[] ipiv, <#=dataType#>[] b)
public override void LUSolveFactored(int columnsOfB, Complex[] a, int order, int[] ipiv, Complex[] b)
{
if (a == null)
{
@ -425,7 +423,7 @@
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.<#=prefix#>_lu_solve_factored(order, columnsOfB, a, ipiv, b);
SafeNativeMethods.z_lu_solve_factored(order, columnsOfB, a, ipiv, b);
}
/// <summary>
@ -436,7 +434,7 @@
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void CholeskyFactor(<#=dataType#>[] a, int order)
public override void CholeskyFactor(Complex[] a, int order)
{
if (a == null)
{
@ -453,7 +451,7 @@
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
var info = SafeNativeMethods.<#=prefix#>_cholesky_factor(order, a);
var info = SafeNativeMethods.z_cholesky_factor(order, a);
if (info > 0)
{
@ -471,7 +469,7 @@
/// <remarks>This is equivalent to the POTRF add POTRS LAPACK routines.
/// </remarks>
[SecuritySafeCritical]
public override void CholeskySolve(<#=dataType#>[] a, int orderA, <#=dataType#>[] b, int columnsB)
public override void CholeskySolve(Complex[] a, int orderA, Complex[] b, int columnsB)
{
if (a == null)
{
@ -493,7 +491,7 @@
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.<#=prefix#>_cholesky_solve(orderA, columnsB, a, b);
SafeNativeMethods.z_cholesky_solve(orderA, columnsB, a, b);
}
/// <summary>
@ -505,7 +503,7 @@
/// <param name="columnsB">The number of columns in the B matrix.</param>
/// <remarks>This is equivalent to the POTRS LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void CholeskySolveFactored(<#=dataType#>[] a, int orderA, <#=dataType#>[] b, int columnsB)
public override void CholeskySolveFactored(Complex[] a, int orderA, Complex[] b, int columnsB)
{
if (a == null)
{
@ -527,7 +525,7 @@
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.<#=prefix#>_cholesky_solve_factored(orderA, columnsB, a, b);
SafeNativeMethods.z_cholesky_solve_factored(orderA, columnsB, a, b);
}
/// <summary>
@ -543,7 +541,7 @@
/// to be used by the QR solve routine.</param>
/// <remarks>This is similar to the GEQRF and ORGQR LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void QRFactor(<#=dataType#>[] r, int rowsR, int columnsR, <#=dataType#>[] q, <#=dataType#>[] tau)
public override void QRFactor(Complex[] r, int rowsR, int columnsR, Complex[] q, Complex[] tau)
{
if (r == null)
{
@ -570,8 +568,8 @@
throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "rowsR * rowsR"), "q");
}
var work = new <#=dataType#>[columnsR * Control.BlockSize];
SafeNativeMethods.<#=prefix#>_qr_factor(rowsR, columnsR, r, tau, q, work, work.Length);
var work = new Complex[columnsR * Control.BlockSize];
SafeNativeMethods.z_qr_factor(rowsR, columnsR, r, tau, q, work, work.Length);
}
/// <summary>
@ -590,7 +588,7 @@
/// work size value.</param>
/// <remarks>This is similar to the GEQRF and ORGQR LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void QRFactor(<#=dataType#>[] r, int rowsR, int columnsR, <#=dataType#>[] q, <#=dataType#>[] tau, <#=dataType#>[] work)
public override void QRFactor(Complex[] r, int rowsR, int columnsR, Complex[] q, Complex[] tau, Complex[] work)
{
if (r == null)
{
@ -628,7 +626,7 @@
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.<#=prefix#>_qr_factor(rowsR, columnsR, r, tau, q, work, work.Length);
SafeNativeMethods.z_qr_factor(rowsR, columnsR, r, tau, q, work, work.Length);
}
/// <summary>
@ -641,7 +639,7 @@
/// <param name="columnsB">The number of columns of B.</param>
/// <param name="x">On exit, the solution matrix.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
public override void QRSolve(<#=dataType#>[] a, int rows, int columns, <#=dataType#>[] b, int columnsB, <#=dataType#>[] x)
public override void QRSolve(Complex[] a, int rows, int columns, Complex[] b, int columnsB, Complex[] x)
{
if (a == null)
{
@ -678,7 +676,7 @@
throw new ArgumentException(Resources.RowsLessThanColumns);
}
var work = new <#=dataType#>[columns * Control.BlockSize];
var work = new Complex[columns * Control.BlockSize];
QRSolve(a, rows, columns, b, columnsB, x, work);
}
@ -695,7 +693,7 @@
/// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal
/// work size value.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
public override void QRSolve(<#=dataType#>[] a, int rows, int columns, <#=dataType#>[] b, int columnsB, <#=dataType#>[] x, <#=dataType#>[] work)
public override void QRSolve(Complex[] a, int rows, int columns, Complex[] b, int columnsB, Complex[] x, Complex[] work)
{
if (a == null)
{
@ -743,14 +741,14 @@
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.<#=prefix#>_qr_solve(rows, columns, columnsB, a, b, x, work, work.Length);
SafeNativeMethods.z_qr_solve(rows, columns, columnsB, a, b, x, work, work.Length);
}
/// <summary>
/// Solves A*X=B for X using a previously QR factored matrix.
/// </summary>
/// <param name="q">The Q matrix obtained by calling <see cref="QRFactor(<#=dataType#>[],int,int,<#=dataType#>[],<#=dataType#>[])"/>.</param>
/// <param name="r">The R matrix obtained by calling <see cref="QRFactor(<#=dataType#>[],int,int,<#=dataType#>[],<#=dataType#>[])"/>. </param>
/// <param name="q">The Q matrix obtained by calling <see cref="QRFactor(Complex[],int,int,Complex[],Complex[])"/>.</param>
/// <param name="r">The R matrix obtained by calling <see cref="QRFactor(Complex[],int,int,Complex[],Complex[])"/>. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="tau">Contains additional information on Q. Only used for the native solver
@ -760,7 +758,7 @@
/// <param name="x">On exit, the solution matrix.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
[SecuritySafeCritical]
public override void QRSolveFactored(<#=dataType#>[] q, <#=dataType#>[] r, int rowsR, int columnsR, <#=dataType#>[] tau, <#=dataType#>[] b, int columnsB, <#=dataType#>[] x)
public override void QRSolveFactored(Complex[] q, Complex[] r, int rowsR, int columnsR, Complex[] tau, Complex[] b, int columnsB, Complex[] x)
{
if (r == null)
{
@ -807,7 +805,7 @@
throw new ArgumentException(Resources.RowsLessThanColumns);
}
var work = new <#=dataType#>[columnsR * Control.BlockSize];
var work = new Complex[columnsR * Control.BlockSize];
QRSolveFactored(q, r, rowsR, columnsR, tau, b, columnsB, x, work);
}
@ -816,7 +814,7 @@
/// </summary>
/// <param name="q">The Q matrix obtained by QR factor. This is only used for the managed provider and can be
/// <c>null</c> for the native provider. The native provider uses the Q portion stored in the R matrix.</param>
/// <param name="r">The R matrix obtained by calling <see cref="QRFactor(<#=dataType#>[],int,int,<#=dataType#>[],<#=dataType#>[])"/>. </param>
/// <param name="r">The R matrix obtained by calling <see cref="QRFactor(Complex[],int,int,Complex[],Complex[])"/>. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="tau">Contains additional information on Q. Only used for the native solver
@ -828,7 +826,7 @@
/// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal
/// work size value.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
public override void QRSolveFactored(<#=dataType#>[] q, <#=dataType#>[] r, int rowsR, int columnsR, <#=dataType#>[] tau, <#=dataType#>[] b, int columnsB, <#=dataType#>[] x, <#=dataType#>[] work)
public override void QRSolveFactored(Complex[] q, Complex[] r, int rowsR, int columnsR, Complex[] tau, Complex[] b, int columnsB, Complex[] x, Complex[] work)
{
if (r == null)
{
@ -886,7 +884,7 @@
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.<#=prefix#>_qr_solve_factored(rowsR, columnsR, columnsB, r, b, tau, x, work, work.Length);
SafeNativeMethods.z_qr_solve_factored(rowsR, columnsR, columnsB, r, b, tau, x, work, work.Length);
}
/// <summary>
@ -903,7 +901,7 @@
/// right singular vectors.</param>
/// <remarks>This is equivalent to the GESVD LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void SingularValueDecomposition(bool computeVectors, <#=dataType#>[] a, int rowsA, int columnsA, <#=dataType#>[] s, <#=dataType#>[] u, <#=dataType#>[] vt)
public override void SingularValueDecomposition(bool computeVectors, Complex[] a, int rowsA, int columnsA, Complex[] s, Complex[] u, Complex[] vt)
{
if (a == null)
{
@ -940,7 +938,7 @@
throw new ArgumentException(Resources.ArgumentArraysSameLength, "s");
}
var work = new <#=dataType#>[<#=svd_work#>];
var work = new Complex[(2 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA)];
SingularValueDecomposition(computeVectors, a, rowsA, columnsA, s, u, vt, work);
}
@ -953,7 +951,7 @@
/// <param name="b">The B matrix.</param>
/// <param name="columnsB">The number of columns of B.</param>
/// <param name="x">On exit, the solution matrix.</param>
public override void SvdSolve(<#=dataType#>[] a, int rowsA, int columnsA, <#=dataType#>[] b, int columnsB, <#=dataType#>[] x)
public override void SvdSolve(Complex[] a, int rowsA, int columnsA, Complex[] b, int columnsB, Complex[] x)
{
if (a == null)
{
@ -980,12 +978,12 @@
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
var work = new <#=dataType#>[<#=svd_work#>];
var s = new <#=dataType#>[Math.Min(rowsA, columnsA)];
var u = new <#=dataType#>[rowsA * rowsA];
var vt = new <#=dataType#>[columnsA * columnsA];
var work = new Complex[(2 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA)];
var s = new Complex[Math.Min(rowsA, columnsA)];
var u = new Complex[rowsA * rowsA];
var vt = new Complex[columnsA * columnsA];
var clone = new <#=dataType#>[a.Length];
var clone = new Complex[a.Length];
a.Copy(clone);
SingularValueDecomposition(true, clone, rowsA, columnsA, s, u, vt, work);
SvdSolveFactored(rowsA, columnsA, s, u, vt, b, columnsB, x);
@ -1008,7 +1006,7 @@
/// On exit, work[0] contains the optimal work size value.</param>
/// <remarks>This is equivalent to the GESVD LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void SingularValueDecomposition(bool computeVectors, <#=dataType#>[] a, int rowsA, int columnsA, <#=dataType#>[] s, <#=dataType#>[] u, <#=dataType#>[] vt, <#=dataType#>[] work)
public override void SingularValueDecomposition(bool computeVectors, Complex[] a, int rowsA, int columnsA, Complex[] s, Complex[] u, Complex[] vt, Complex[] work)
{
if (a == null)
{
@ -1055,11 +1053,13 @@
throw new ArgumentException(Resources.ArgumentSingleDimensionArray, "work");
}
if (work.Length < <#=svd_work#>)
if (work.Length < (2 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA))
{
work[0] = <#=svd_work#>;
work[0] = (2 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA);
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.<#=prefix#>_svd_factor(computeVectors, rowsA, columnsA, a, s, u, vt, work, work.Length);
SafeNativeMethods.z_svd_factor(computeVectors, rowsA, columnsA, a, s, u, vt, work, work.Length);
}
}
}

12
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex.tt

@ -1,12 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "GotoBlas";#>
<# string title = "GotoBLAS2";#>
<# string dataType = "Complex";#>
<# string zero = "Complex.Zero";#>
<# string one = "Complex.One";#>
<# string prefix = "z";#>
<# string svd_work = "2 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

1064
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex32.cs

File diff suppressed because it is too large

12
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.Complex32.tt

@ -1,12 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "GotoBlas";#>
<# string title = "GotoBLAS2";#>
<# string dataType = "Complex32";#>
<# string zero = "Complex32.Zero";#>
<# string one = "Complex32.One";#>
<# string prefix = "c";#>
<# string svd_work = "2 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

1064
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.double.cs

File diff suppressed because it is too large

12
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.double.tt

@ -1,12 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "GotoBlas";#>
<# string title = "GotoBLAS2";#>
<# string dataType = "double";#>
<# string zero = "0.0";#>
<# string one = "1.0";#>
<# string prefix = "d";#>
<# string svd_work = "Math.Max((3 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA), 5 * Math.Min(rowsA, columnsA))";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

1064
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.float.cs

File diff suppressed because it is too large

12
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/GotoBlasLinearAlgebraProvider.float.tt

@ -1,12 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "GotoBlas";#>
<# string title = "GotoBLAS2";#>
<# string dataType = "float";#>
<# string zero = "0.0f";#>
<# string one = "1.0f";#>
<# string prefix = "s";#>
<# string svd_work = "Math.Max((3 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)), 5 * Math.Min(rowsA, columnsA))";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.footer.include" #>

259
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/SafeNativeMethods.cs

@ -0,0 +1,259 @@
// <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>
using System.Numerics;
using System.Runtime.InteropServices;
using System.Security;
namespace MathNet.Numerics.Algorithms.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>
private 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
}
}

8
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/SafeNativeMethods.tt

@ -1,8 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string namespaceSuffix = "GotoBlas";
string library = "GotoBLAS2";
#>
<#@ include file="..\safe.native.common.include" #>
}
}

363
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Common.cs

@ -0,0 +1,363 @@
// <copyright file="MklLinearAlgebraProvider.Common.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>
namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
{
using System;
using System.Numerics;
using System.Security;
using Properties;
/// <summary>
/// Intel's Math Kernel Library (MKL) linear algebra provider.
/// </summary>
public partial class MklLinearAlgebraProvider : 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);
}
}
}

8
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Common.tt

@ -1,8 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Mkl";#>
<# string title = "Intel's Math Kernel Library (MKL)";#>
<# string dataType = "Common";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.norm.include" #>
<#@ include file="..\native.footer.include" #>

1233
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex.cs

File diff suppressed because it is too large

14
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex.tt

@ -1,14 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Mkl";#>
<# string title = "Intel's Math Kernel Library (MKL)";#>
<# string dataType = "Complex";#>
<# string zero = "Complex.Zero";#>
<# string one = "Complex.One";#>
<# string prefix = "z";#>
<# string svd_work = "2 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.vector.include" #>
<#@ include file="..\native.footer.include" #>

1232
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex32.cs

File diff suppressed because it is too large

14
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.Complex32.tt

@ -1,14 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Mkl";#>
<# string title = "Intel's Math Kernel Library (MKL)";#>
<# string dataType = "Complex32";#>
<# string zero = "Complex32.Zero";#>
<# string one = "Complex32.One";#>
<# string prefix = "c";#>
<# string svd_work = "2 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.vector.include" #>
<#@ include file="..\native.footer.include" #>

1232
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.double.cs

File diff suppressed because it is too large

14
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.double.tt

@ -1,14 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Mkl";#>
<# string title = "Intel's Math Kernel Library (MKL)";#>
<# string dataType = "double";#>
<# string zero = "0.0";#>
<# string one = "1.0";#>
<# string prefix = "d";#>
<# string svd_work = "Math.Max((3 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA), 5 * Math.Min(rowsA, columnsA))";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.vector.include" #>
<#@ include file="..\native.footer.include" #>

1236
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.float.cs

File diff suppressed because it is too large

14
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.float.tt

@ -1,14 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string library = "Mkl";#>
<# string title = "Intel's Math Kernel Library (MKL)";#>
<# string dataType = "float";#>
<# string zero = "0.0f";#>
<# string one = "1.0f";#>
<# string prefix = "s";#>
<# string svd_work = "Math.Max((3 * Math.Min(rowsA, columnsA) + Math.Max(rowsA, columnsA)), 5 * Math.Min(rowsA, columnsA))";#>
<#@ include file="..\native.header.include" #>
<#@ include file="..\native.dotproduct.include" #>
<#@ include file="..\native.generic.include" #>
<#@ include file="..\native.vector.include" #>
<#@ include file="..\native.footer.include" #>

311
src/Numerics/Algorithms/LinearAlgebra/Mkl/SafeNativeMethods.cs

@ -0,0 +1,311 @@
// <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>
using System.Numerics;
using System.Runtime.InteropServices;
using System.Security;
namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
{
/// <summary>
/// P/Invoke methods to the native math libraries.
/// </summary>
[SuppressUnmanagedCodeSecurity]
[SecurityCritical]
internal static class SafeNativeMethods
{
/// <summary>
/// Name of the native DLL.
/// </summary>
private const string DllName = "MathNET.Numerics.MKL.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
#region Vector Functions
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_add(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_subtract(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_multiply(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_divide(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_add(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_subtract(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_multiply(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_divide(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_add(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_subtract(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_multiply(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_divide(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_add(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_subtract(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_multiply(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_divide(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
#endregion Vector Functions
}
}

9
src/Numerics/Algorithms/LinearAlgebra/Mkl/SafeNativeMethods.tt

@ -1,9 +0,0 @@
<#@ template language="C#" debug="true" #>
<#@ output extenstion="cs" #>
<# string namespaceSuffix = "Mkl";
string library = "MKL";
#>
<#@ include file="..\safe.native.common.include" #>
<#@ include file="..\safe.native.vector.include" #>
}
}

27
src/Numerics/Algorithms/LinearAlgebra/native.dotproduct.include

@ -1,27 +0,0 @@
 /// <summary>
/// Computes the dot product of x and y.
/// </summary>
/// <param name="x">The vector x.</param>
/// <param name="y">The vector y.</param>
/// <returns>The dot product of x and y.</returns>
/// <remarks>This is equivalent to the DOT BLAS routine.</remarks>
[SecuritySafeCritical]
public override <#=dataType#> DotProduct(<#=dataType#>[] x, <#=dataType#>[] y)
{
if (y == null)
{
throw new ArgumentNullException("y");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (x.Length != y.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
return SafeNativeMethods.<#=prefix#>_dot_product(x.Length, x, y);
}

2
src/Numerics/Algorithms/LinearAlgebra/native.footer.include

@ -1,2 +0,0 @@
 }
}

46
src/Numerics/Algorithms/LinearAlgebra/native.header.include

@ -1,46 +0,0 @@
// <copyright file="<#=library#>LinearAlgebraProvider.<#=dataType#>.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>
/* This file is automatically generated - do not modify it.
Last generated on UTC <#=DateTime.UtcNow.ToString("u")#>
*/
namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#>
{
using System;
using System.Numerics;
using System.Security;
using Properties;
/// <summary>
/// <#=title#> linear algebra provider.
/// </summary>
public partial class <#=library#>LinearAlgebraProvider : ManagedLinearAlgebraProvider
{

139
src/Numerics/Algorithms/LinearAlgebra/native.vector.include

@ -1,139 +0,0 @@
 /// <summary>
/// Does a point wise add of two arrays <c>z = x + y</c>. This can be used
/// to add vectors or matrices.
/// </summary>
/// <param name="x">The array x.</param>
/// <param name="y">The array y.</param>
/// <param name="result">The result of the addition.</param>
/// <remarks>There is no equivalent BLAS routine, but many libraries
/// provide optimized (parallel and/or vectorized) versions of this
/// routine.</remarks>
public override void AddArrays(<#=dataType#>[] x, <#=dataType#>[] y, <#=dataType#>[] result)
{
if (y == null)
{
throw new ArgumentNullException("y");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (x.Length != y.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
if (x.Length != result.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
SafeNativeMethods.<#=prefix#>_vector_add(x.Length, x, y, result);
}
/// <summary>
/// Does a point wise subtraction of two arrays <c>z = x - y</c>. This can be used
/// to subtract vectors or matrices.
/// </summary>
/// <param name="x">The array x.</param>
/// <param name="y">The array y.</param>
/// <param name="result">The result of the subtraction.</param>
/// <remarks>There is no equivalent BLAS routine, but many libraries
/// provide optimized (parallel and/or vectorized) versions of this
/// routine.</remarks>
public override void SubtractArrays(<#=dataType#>[] x, <#=dataType#>[] y, <#=dataType#>[] result)
{
if (y == null)
{
throw new ArgumentNullException("y");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (x.Length != y.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
if (x.Length != result.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
SafeNativeMethods.<#=prefix#>_vector_subtract(x.Length, x, y, result);
}
/// <summary>
/// Does a point wise multiplication of two arrays <c>z = x * y</c>. This can be used
/// to multiple elements of vectors or matrices.
/// </summary>
/// <param name="x">The array x.</param>
/// <param name="y">The array y.</param>
/// <param name="result">The result of the point wise multiplication.</param>
/// <remarks>There is no equivalent BLAS routine, but many libraries
/// provide optimized (parallel and/or vectorized) versions of this
/// routine.</remarks>
public override void PointWiseMultiplyArrays(<#=dataType#>[] x, <#=dataType#>[] y, <#=dataType#>[] result)
{
if (y == null)
{
throw new ArgumentNullException("y");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (x.Length != y.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
if (x.Length != result.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
SafeNativeMethods.<#=prefix#>_vector_multiply(x.Length, x, y, result);
}
/// <summary>
/// Does a point wise division of two arrays <c>z = x / y</c>. This can be used
/// to divide elements of vectors or matrices.
/// </summary>
/// <param name="x">The array x.</param>
/// <param name="y">The array y.</param>
/// <param name="result">The result of the point wise division.</param>
/// <remarks>There is no equivalent BLAS routine, but many libraries
/// provide optimized (parallel and/or vectorized) versions of this
/// routine.</remarks>
public override void PointWiseDivideArrays(<#=dataType#>[] x, <#=dataType#>[] y, <#=dataType#>[] result)
{
if (y == null)
{
throw new ArgumentNullException("y");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (x.Length != y.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
if (x.Length != result.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
SafeNativeMethods.<#=prefix#>_vector_divide(x.Length, x, y, result);
}

52
src/Numerics/Algorithms/LinearAlgebra/safe.native.vector.include

@ -1,52 +0,0 @@

#region Vector Functions
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_add(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_subtract(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_multiply(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void s_vector_divide(int n, float[] x, float[] y, [In, Out] float[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_add(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_subtract(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_multiply(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void d_vector_divide(int n, double[] x, double[] y, [In, Out] double[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_add(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_subtract(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_multiply(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void c_vector_divide(int n, Complex32[] x, Complex32[] y, [In, Out] Complex32[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_add(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_subtract(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_multiply(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
[DllImport(DllName, ExactSpelling = true, SetLastError = false, CallingConvention = CallingConvention.Cdecl)]
internal static extern void z_vector_divide(int n, Complex[] x, Complex[] y, [In, Out] Complex[] result);
#endregion Vector Functions

194
src/Numerics/Numerics.csproj

@ -18,6 +18,8 @@
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@ -30,10 +32,8 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -70,182 +70,34 @@
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Common.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AcmlLinearAlgebraProvider.Common.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AcmlLinearAlgebraProvider.Complex.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex32.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AcmlLinearAlgebraProvider.Complex32.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.double.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AcmlLinearAlgebraProvider.double.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.float.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AcmlLinearAlgebraProvider.float.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Acml\SafeNativeMethods.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>SafeNativeMethods.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\native.dotproduct.include" />
<None Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Common.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>GotoBlasLinearAlgebraProvider.Common.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>GotoBlasLinearAlgebraProvider.Complex.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex32.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>GotoBlasLinearAlgebraProvider.Complex32.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.double.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>GotoBlasLinearAlgebraProvider.double.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.float.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>GotoBlasLinearAlgebraProvider.float.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\GotoBlas\SafeNativeMethods.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>SafeNativeMethods.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Common.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MklLinearAlgebraProvider.Common.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\native.generic.include" />
<None Include="Algorithms\LinearAlgebra\safe.native.vector.include">
<LastGenOutput>SafeNativeMethods.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\native.footer.include" />
<None Include="Algorithms\LinearAlgebra\native.norm.include" />
<None Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex32.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MklLinearAlgebraProvider.Complex32.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MklLinearAlgebraProvider.Complex.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.float.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MklLinearAlgebraProvider.float.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.double.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MklLinearAlgebraProvider.double.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\Mkl\SafeNativeMethods.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>SafeNativeMethods.cs</LastGenOutput>
</None>
<None Include="Algorithms\LinearAlgebra\native.vector.include" />
<Compile Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Common.cs">
<DependentUpon>AcmlLinearAlgebraProvider.Common.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex.cs">
<DependentUpon>AcmlLinearAlgebraProvider.Complex.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.Complex32.cs">
<DependentUpon>AcmlLinearAlgebraProvider.Complex32.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.double.cs">
<DependentUpon>AcmlLinearAlgebraProvider.double.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Acml\AcmlLinearAlgebraProvider.float.cs">
<DependentUpon>AcmlLinearAlgebraProvider.float.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Acml\SafeNativeMethods.cs">
<DependentUpon>SafeNativeMethods.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Common.cs">
<DependentUpon>GotoBlasLinearAlgebraProvider.Common.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex.cs">
<DependentUpon>GotoBlasLinearAlgebraProvider.Complex.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex32.cs">
<DependentUpon>GotoBlasLinearAlgebraProvider.Complex32.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.double.cs">
<DependentUpon>GotoBlasLinearAlgebraProvider.double.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.float.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>GotoBlasLinearAlgebraProvider.float.tt</DependentUpon>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\SafeNativeMethods.cs">
<DependentUpon>SafeNativeMethods.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Common.cs" />
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex.cs" />
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.Complex32.cs" />
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.double.cs" />
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\GotoBlasLinearAlgebraProvider.float.cs" />
<Compile Include="Algorithms\LinearAlgebra\GotoBlas\SafeNativeMethods.cs" />
<Compile Include="Algorithms\LinearAlgebra\ManagedLinearAlgebraProvider.Complex32.cs" />
<Compile Include="Algorithms\LinearAlgebra\ManagedLinearAlgebraProvider.Complex.cs" />
<Compile Include="Algorithms\LinearAlgebra\ManagedLinearAlgebraProvider.Single.cs" />
<Compile Include="Algorithms\LinearAlgebra\ILinearAlgebraProvider.cs" />
<Compile Include="Algorithms\LinearAlgebra\ILinearAlgebraProviderOfT.cs" />
<Compile Include="Algorithms\LinearAlgebra\ManagedLinearAlgebraProvider.Double.cs" />
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Common.cs">
<DependentUpon>MklLinearAlgebraProvider.Common.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex32.cs">
<DependentUpon>MklLinearAlgebraProvider.Complex32.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex.cs">
<DependentUpon>MklLinearAlgebraProvider.Complex.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.float.cs">
<DependentUpon>MklLinearAlgebraProvider.float.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.double.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>MklLinearAlgebraProvider.double.tt</DependentUpon>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Mkl\SafeNativeMethods.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>SafeNativeMethods.tt</DependentUpon>
</Compile>
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Common.cs" />
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex.cs" />
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.Complex32.cs" />
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.double.cs" />
<Compile Include="Algorithms\LinearAlgebra\Mkl\MklLinearAlgebraProvider.float.cs" />
<Compile Include="Algorithms\LinearAlgebra\Mkl\SafeNativeMethods.cs" />
<Compile Include="ArrayExtensions.cs" />
<Compile Include="Combinatorics.cs" />
<Compile Include="ComplexExtensions.cs" />
@ -594,22 +446,8 @@
<None Include="..\MathNet.Numerics.snk">
<Link>MathNet.Numerics.snk</Link>
</None>
<None Include="Algorithms\LinearAlgebra\native.header.include" />
<None Include="Algorithms\LinearAlgebra\safe.native.common.include">
<LastGenOutput>SafeNativeMethods.cs</LastGenOutput>
</None>
<Compile Include="Distributions\Continuous\StudentT.cs" />
<Compile Include="Distributions\Multivariate\NormalGamma.cs" />
<Compile Include="Version.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Version.tt</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Version.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Version.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
@ -635,8 +473,8 @@
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>cd $(ProjectDir)..\..\build
t4.bat</PreBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

2
src/Numerics/Properties/AssemblyInfo.cs

@ -45,3 +45,5 @@ using System.Runtime.InteropServices;
[assembly: Guid("7b66646f-f0ee-425d-9065-910d1937a2df")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed2314a577643d859571b8b9307c6ff2670525c4598fbb307e57ea65ebf5d4417284cb3da9181636480b623f4db8cc3c1947244ba069df0df86e2431621f51a488f9929519a1c5d0ae595f6e2d0e4094685f0c1229ff658360acbb9f63f1a0258e984dda00dc7ad4fd16dbb550ec1ef8a11df138402b7c1998ee224e652c839b")]
[assembly: AssemblyVersion("2011.04.17.0")]
[assembly: AssemblyFileVersion("2011.04.17")]

38
src/Numerics/Version.tt

@ -1,38 +0,0 @@
// <copyright file="Version.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://mathnet.opensourcedotnet.info
//
// Copyright (c) 2009 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>
/* This file is automatically generated - do not modify it. Change Version.tt instead.
Last generated on UTC <#=DateTime.UtcNow.ToString("u")#>
*/
<#@ template Language="C#"#>
using System.Reflection;
<# DateTime date = DateTime.UtcNow; #>
[assembly: AssemblyVersion("<#=date.Year#>.<#=date.Month.ToString("0#")#>.<#=date.Day#>.<#=(int)date.TimeOfDay.TotalMinutes#>")]
[assembly: AssemblyFileVersion("<#=date.Year#>.<#=date.Month.ToString("0#")#>.<#=date.Day#>.<#=(int)date.TimeOfDay.TotalMinutes#>")]
Loading…
Cancel
Save