Browse Source

native: finished acml provider - needs more testing

la-knuth
Marcus Cuda 16 years ago
parent
commit
bc1d9df3bc
  1. 2
      .gitignore
  2. 7
      build/t4.bat
  3. 102
      src/NativeWrappers/Windows/ACMLWrapperTests/ACMLWrapperTests.csproj
  4. 51
      src/NativeWrappers/Windows/ACMLWrapperTests/Complex/AcmlLinearAlgebraProviderTests.cs
  5. 51
      src/NativeWrappers/Windows/ACMLWrapperTests/Complex32/AcmlLinearAlgebraProviderTests.cs
  6. 51
      src/NativeWrappers/Windows/ACMLWrapperTests/Double/AcmlLinearAlgebraProviderTests.cs
  7. 36
      src/NativeWrappers/Windows/ACMLWrapperTests/Properties/AssemblyInfo.cs
  8. 51
      src/NativeWrappers/Windows/ACMLWrapperTests/Single/AcmlLinearAlgebraProviderTests.cs
  9. 14
      src/NativeWrappers/Windows/NativeWrappers.sln
  10. 7
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Common.tt
  11. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex.tt
  12. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.Complex32.tt
  13. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.double.tt
  14. 13
      src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.float.tt
  15. 8
      src/Numerics/Algorithms/LinearAlgebra/Acml/SafeNativeMethods.tt
  16. 54
      src/Numerics/Numerics.csproj
  17. 4
      src/UnitTests/Setup.cs

2
.gitignore

@ -12,4 +12,6 @@ bin
*.XML
Version1.cs
src/Numerics/Algorithms/LinearAlgebra/Mkl/*.cs
src/Numerics/Algorithms/LinearAlgebra/Acml/*.cs
src/Numerics/Algorithms/LinearAlgebra/GotoBlas/*.cs
out

7
build/t4.bat

@ -26,4 +26,11 @@ GOTO prepare
"%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 =

102
src/NativeWrappers/Windows/ACMLWrapperTests/ACMLWrapperTests.csproj

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ACMLWrapperTests</RootNamespace>
<AssemblyName>ACMLWrapperTests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="MathNet.Numerics">
<HintPath>..\..\..\..\out\debug\Net40\MathNet.Numerics.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\..\..\..\lib\NUnit.2.5.9\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\UnitTests\AssertHelpers.cs">
<Link>AssertHelpers.cs</Link>
</Compile>
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Complex32\LinearAlgebraProviderTests.cs">
<Link>Complex32\LinearAlgebraProviderTests.cs</Link>
</Compile>
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Complex\LinearAlgebraProviderTests.cs">
<Link>Complex\LinearAlgebraProviderTests.cs</Link>
</Compile>
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Double\LinearAlgebraProviderTests.cs">
<Link>Double\LinearAlgebraProviderTests.cs</Link>
</Compile>
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Single\LinearAlgebraProviderTests.cs">
<Link>Single\LinearAlgebraProviderTests.cs</Link>
</Compile>
<Compile Include="Complex32\AcmlLinearAlgebraProviderTests.cs" />
<Compile Include="Complex\AcmlLinearAlgebraProviderTests.cs" />
<Compile Include="Double\AcmlLinearAlgebraProviderTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Single\AcmlLinearAlgebraProviderTests.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="..\Release\MathNET.Numerics.ACML.dll">
<Link>MathNET.Numerics.ACML.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libacml_mp_dll.dll">
<Link>libacml_mp_dll.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libifcoremd.dll">
<Link>libifcoremd.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libiomp5md.dll">
<Link>libiomp5md.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libmmd.dll">
<Link>libmmd.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

51
src/NativeWrappers/Windows/ACMLWrapperTests/Complex/AcmlLinearAlgebraProviderTests.cs

@ -0,0 +1,51 @@
// <copyright file="AcmlLinearAlgebraProviderTests.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-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 MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex;
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Complex
{
using NUnit.Framework;
/// <summary>
/// Unit test container for the ACML linear algebra provider.
/// </summary>
[TestFixture]
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests
{
/// <summary>
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
/// </summary>
public AcmlLinearAlgebraProviderTests()
{
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider();
}
}
}

51
src/NativeWrappers/Windows/ACMLWrapperTests/Complex32/AcmlLinearAlgebraProviderTests.cs

@ -0,0 +1,51 @@
// <copyright file="AcmlLinearAlgebraProviderTests.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-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 MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex;
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Complex32
{
using NUnit.Framework;
/// <summary>
/// Unit test container for the ACML linear algebra provider.
/// </summary>
[TestFixture]
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests
{
/// <summary>
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
/// </summary>
public AcmlLinearAlgebraProviderTests()
{
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider();
}
}
}

51
src/NativeWrappers/Windows/ACMLWrapperTests/Double/AcmlLinearAlgebraProviderTests.cs

@ -0,0 +1,51 @@
// <copyright file="AcmlLinearAlgebraProviderTests.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-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 MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex;
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Double
{
using NUnit.Framework;
/// <summary>
/// Unit test container for the ACML linear algebra provider.
/// </summary>
[TestFixture]
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests
{
/// <summary>
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
/// </summary>
public AcmlLinearAlgebraProviderTests()
{
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider();
}
}
}

36
src/NativeWrappers/Windows/ACMLWrapperTests/Properties/AssemblyInfo.cs

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ACMLWrapperTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("ACMLWrapperTests")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("83801bc7-d554-4669-aede-db11d009d283")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

51
src/NativeWrappers/Windows/ACMLWrapperTests/Single/AcmlLinearAlgebraProviderTests.cs

@ -0,0 +1,51 @@
// <copyright file="AcmlLinearAlgebraProviderTests.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-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 MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex;
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Single
{
using NUnit.Framework;
/// <summary>
/// Unit test container for the ACML linear algebra provider.
/// </summary>
[TestFixture]
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests
{
/// <summary>
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
/// </summary>
public AcmlLinearAlgebraProviderTests()
{
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider();
}
}
}

14
src/NativeWrappers/Windows/NativeWrappers.sln

@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GotoBLAS2WrapperTests", "Go
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACMLWrapper", "ACMLWrapper\ACMKWrapper.vcxproj", "{8774BCBE-27D0-44D2-A1B3-8ED705E252CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ACMLWrapperTests", "ACMLWrapperTests\ACMLWrapperTests.csproj", "{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -96,6 +98,18 @@ Global
{8774BCBE-27D0-44D2-A1B3-8ED705E252CB}.Release|Win32.Build.0 = Release|Win32
{8774BCBE-27D0-44D2-A1B3-8ED705E252CB}.Release|x64.ActiveCfg = Release|x64
{8774BCBE-27D0-44D2-A1B3-8ED705E252CB}.Release|x64.Build.0 = Release|x64
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Debug|Win32.ActiveCfg = Debug|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Debug|x64.ActiveCfg = Debug|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Release|Any CPU.Build.0 = Release|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Release|Win32.ActiveCfg = Release|Any CPU
{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}.Release|x64.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

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

@ -0,0 +1,7 @@
<#@ 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" #>

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

@ -0,0 +1,13 @@
<#@ 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" #>

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

@ -0,0 +1,13 @@
<#@ 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" #>

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

@ -0,0 +1,13 @@
<#@ 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" #>

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

@ -0,0 +1,13 @@
<#@ 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" #>

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

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

54
src/Numerics/Numerics.csproj

@ -70,6 +70,30 @@
</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>
@ -126,6 +150,36 @@
<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>

4
src/UnitTests/Setup.cs

@ -49,5 +49,9 @@ public class Setup
{
MathNet.Numerics.Control.LinearAlgebraProvider = new MathNet.Numerics.Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider();
}
else if (provider.Contains("acml"))
{
MathNet.Numerics.Control.LinearAlgebraProvider = new MathNet.Numerics.Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider();
}
}
}

Loading…
Cancel
Save