Browse Source

Build: add .Net 4.6.1 target

pull/555/merge
Christoph Ruegg 8 years ago
parent
commit
fd83040a2f
  1. 12
      build.fsx
  2. 2
      src/Benchmark/Benchmark.csproj
  3. 6
      src/Benchmark/Transforms/FFT.cs
  4. 2
      src/FSharp.Tests/FSharp.Tests.fsproj
  5. 4
      src/Numerics.Tests/Numerics.Tests.CUDA.csproj
  6. 4
      src/Numerics.Tests/Numerics.Tests.MKL.csproj
  7. 4
      src/Numerics.Tests/Numerics.Tests.OpenBLAS.csproj
  8. 4
      src/Numerics.Tests/Numerics.Tests.csproj
  9. 2
      src/Numerics/Control.cs
  10. 7
      src/Numerics/IntegralTransforms/Fourier.RadixN.cs
  11. 17
      src/Numerics/LinearAlgebra/Matrix.cs
  12. 17
      src/Numerics/LinearAlgebra/Vector.cs
  13. 2
      src/Numerics/Numerics.csproj

12
build.fsx

@ -397,25 +397,25 @@ Target "TestNumericsCore1.1" (fun _ -> testNumerics "netcoreapp1.1")
Target "TestNumericsCore2.0" (fun _ -> testNumerics "netcoreapp2.0")
Target "TestNumericsNET40" (fun _ -> testNumerics "net40")
Target "TestNumericsNET45" (fun _ -> testNumerics "net45")
Target "TestNumericsNET46" (fun _ -> testNumerics "net46")
Target "TestNumericsNET461" (fun _ -> testNumerics "net461")
Target "TestNumericsNET47" (fun _ -> testNumerics "net47")
"Build" ==> "TestNumericsCore1.1" ==> "TestNumerics"
"Build" ==> "TestNumericsCore2.0"
"Build" =?> ("TestNumericsNET40", isWindows)
"Build" =?> ("TestNumericsNET45", isWindows) ==> "TestNumerics"
"Build" =?> ("TestNumericsNET46", isWindows)
"Build" =?> ("TestNumericsNET45", isWindows)
"Build" =?> ("TestNumericsNET461", isWindows) ==> "TestNumerics"
"Build" =?> ("TestNumericsNET47", isWindows)
let testFsharp framework = testLibrary "src/FSharp.Tests" "FSharp.Tests.fsproj" framework
Target "TestFsharp" DoNothing
Target "TestFsharpCore1.1" (fun _ -> testFsharp "netcoreapp1.1")
Target "TestFsharpCore2.0" (fun _ -> testFsharp "netcoreapp2.0")
Target "TestFsharpNET45" (fun _ -> testFsharp "net45")
Target "TestFsharpNET46" (fun _ -> testFsharp "net46")
Target "TestFsharpNET461" (fun _ -> testFsharp "net461")
Target "TestFsharpNET47" (fun _ -> testFsharp "net47")
"Build" ==> "TestFsharpCore1.1" ==> "TestFsharp"
"Build" ==> "TestFsharpCore2.0"
"Build" =?> ("TestFsharpNET45", isWindows) ==> "TestFsharp"
"Build" =?> ("TestFsharpNET46", isWindows)
"Build" =?> ("TestFsharpNET45", isWindows)
"Build" =?> ("TestFsharpNET461", isWindows) ==> "TestFsharp"
"Build" =?> ("TestFsharpNET47", isWindows)
Target "Test" DoNothing
"TestNumerics" ==> "Test"

2
src/Benchmark/Benchmark.csproj

@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>Benchmark</AssemblyName>

6
src/Benchmark/Transforms/FFT.cs

@ -16,15 +16,15 @@ namespace Benchmark.Transforms
public Config()
{
Add(
new Job("CLR RyuJit x64", RunMode.Default, EnvMode.RyuJitX64)
new Job("CLR x64", RunMode.Default, EnvMode.RyuJitX64)
{
Env = { Runtime = Runtime.Clr, Platform = Platform.X64 }
},
new Job("CLR RyuJit x86", RunMode.Default, EnvMode.RyuJitX86)
new Job("CLR x86", RunMode.Default, EnvMode.LegacyJitX86)
{
Env = { Runtime = Runtime.Clr, Platform = Platform.X86 }
});
#if !NET46
#if !NET461
Add(new Job("Core RyuJit x64", RunMode.Default, EnvMode.RyuJitX64)
{
Env = { Runtime = Runtime.Core, Platform = Platform.X64 }

2
src/FSharp.Tests/FSharp.Tests.fsproj

@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.FSharp.Tests</AssemblyName>

4
src/Numerics.Tests/Numerics.Tests.CUDA.csproj

@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests.CUDA</AssemblyName>
@ -10,7 +10,7 @@
<IsPackable>false</IsPackable>
<DefineConstants>NATIVE;CUDA</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

4
src/Numerics.Tests/Numerics.Tests.MKL.csproj

@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests.MKL</AssemblyName>
@ -10,7 +10,7 @@
<IsPackable>false</IsPackable>
<DefineConstants>NATIVE;MKL</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

4
src/Numerics.Tests/Numerics.Tests.OpenBLAS.csproj

@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests.OpenBLAS</AssemblyName>
@ -10,7 +10,7 @@
<IsPackable>false</IsPackable>
<DefineConstants>NATIVE;OPENBLAS</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

4
src/Numerics.Tests/Numerics.Tests.csproj

@ -2,14 +2,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp1.1;netcoreapp2.0</TargetFrameworks>
<RuntimeFrameworkVersion>2.0.5</RuntimeFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests</AssemblyName>
<RootNamespace>MathNet.Numerics.Tests</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />

2
src/Numerics/Control.cs

@ -303,6 +303,8 @@ namespace MathNet.Numerics
sb.AppendLine("Built for .Net Standard 2.0");
#elif NET40
sb.AppendLine("Built for .Net Framework 4.0");
#elif NET461
sb.AppendLine("Built for .Net Framework 4.6.1");
#endif
#if !NATIVE
sb.AppendLine("No Native Provider Support");

7
src/Numerics/IntegralTransforms/Fourier.RadixN.cs

@ -29,6 +29,7 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using MathNet.Numerics.Properties;
using MathNet.Numerics.Threading;
@ -74,6 +75,9 @@ namespace MathNet.Numerics.IntegralTransforms
/// <param name="exponentSign">Fourier series exponent sign.</param>
/// <param name="levelSize">Level Group Size.</param>
/// <param name="k">Index inside of the level.</param>
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
static void Radix2Step(Complex32[] samples, int exponentSign, int levelSize, int k)
{
// Twiddle Factor
@ -97,6 +101,9 @@ namespace MathNet.Numerics.IntegralTransforms
/// <param name="exponentSign">Fourier series exponent sign.</param>
/// <param name="levelSize">Level Group Size.</param>
/// <param name="k">Index inside of the level.</param>
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
static void Radix2Step(Complex[] samples, int exponentSign, int levelSize, int k)
{
// Twiddle Factor

17
src/Numerics/LinearAlgebra/Matrix.cs

@ -31,6 +31,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime;
using System.Runtime.CompilerServices;
using MathNet.Numerics.LinearAlgebra.Storage;
using MathNet.Numerics.Properties;
using MathNet.Numerics.Threading;
@ -92,12 +93,16 @@ namespace MathNet.Numerics.LinearAlgebra
/// to get and set values without range checking.</remarks>
public T this[int row, int column]
{
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
get { return Storage[row, column]; }
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
set { Storage[row, column] = value; }
}
@ -113,8 +118,10 @@ namespace MathNet.Numerics.LinearAlgebra
/// <returns>
/// The requested element.
/// </returns>
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
public T At(int row, int column)
{
return Storage.At(row, column);
@ -132,8 +139,10 @@ namespace MathNet.Numerics.LinearAlgebra
/// <param name="value">
/// The value to set the element to.
/// </param>
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
public void At(int row, int column, T value)
{
Storage.At(row, column, value);

17
src/Numerics/LinearAlgebra/Vector.cs

@ -31,6 +31,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime;
using System.Runtime.CompilerServices;
using MathNet.Numerics.LinearAlgebra.Storage;
using MathNet.Numerics.Properties;
@ -76,20 +77,26 @@ namespace MathNet.Numerics.LinearAlgebra
/// greater than the size of the vector.</exception>
public T this[int index]
{
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
get { return Storage[index]; }
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
set { Storage[index] = value; }
}
/// <summary>Gets the value at the given <paramref name="index"/> without range checking..</summary>
/// <param name="index">The index of the value to get or set.</param>
/// <returns>The value of the vector at the given <paramref name="index"/>.</returns>
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
public T At(int index)
{
return Storage.At(index);
@ -98,8 +105,10 @@ namespace MathNet.Numerics.LinearAlgebra
/// <summary>Sets the <paramref name="value"/> at the given <paramref name="index"/> without range checking..</summary>
/// <param name="index">The index of the value to get or set.</param>
/// <param name="value">The value to set.</param>
#if !NET40
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
//[MethodImpl(MethodImplOptions.AggressiveInlining)] .Net 4.5 only
public void At(int index, T value)
{
Storage.At(index, value);

2
src/Numerics/Numerics.csproj

@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net40;netstandard1.3;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net40;net461;netstandard1.3;netstandard2.0</TargetFrameworks>
<NetStandardImplicitPackageVersion>2.0.1</NetStandardImplicitPackageVersion>
<AssemblyName>MathNet.Numerics</AssemblyName>
<RootNamespace>MathNet.Numerics</RootNamespace>

Loading…
Cancel
Save