From 8d34eb3d7c6a7d7b7d4f71a1f2f91666f6b3aa05 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sat, 3 Feb 2018 09:52:15 +0100 Subject: [PATCH] Integration examples into different environments --- integrations/net45-console-csharp/App.config | 6 ++ integrations/net45-console-csharp/Program.cs | 29 ++++++ .../Properties/AssemblyInfo.cs | 36 +++++++ .../net45-console-csharp.csproj | 59 +++++++++++ .../net45-console-csharp.sln | 25 +++++ integrations/net45-console-fsharp/App.config | 6 ++ .../net45-console-fsharp/AssemblyInfo.fs | 41 ++++++++ integrations/net45-console-fsharp/Program.fs | 24 +++++ .../net45-console-fsharp.fsproj | 99 +++++++++++++++++++ .../net45-console-fsharp.sln | 25 +++++ .../net45-console-fsharp/packages.config | 8 ++ integrations/net471-console-csharp/App.config | 6 ++ integrations/net471-console-csharp/Program.cs | 31 ++++++ .../Properties/AssemblyInfo.cs | 36 +++++++ .../net471-console-csharp.csproj | 60 +++++++++++ .../net471-console-csharp.sln | 25 +++++ integrations/net471-console-fsharp/App.config | 6 ++ .../net471-console-fsharp/AssemblyInfo.fs | 41 ++++++++ integrations/net471-console-fsharp/Program.fs | 26 +++++ .../net471-console-fsharp.fsproj | 98 ++++++++++++++++++ .../net471-console-fsharp.sln | 25 +++++ .../net471-console-fsharp/packages.config | 8 ++ .../netcore11-console-csharp/Program.cs | 32 ++++++ .../netcore11-console-csharp.csproj | 13 +++ .../netcore11-console-csharp.sln | 25 +++++ .../netcore11-console-fsharp/Program.fs | 25 +++++ .../netcore11-console-fsharp.fsproj | 17 ++++ .../netcore11-console-fsharp.sln | 25 +++++ .../netcore20-console-csharp/Program.cs | 32 ++++++ .../netcore20-console-csharp.csproj | 14 +++ .../netcore20-console-csharp.sln | 25 +++++ .../netcore20-console-fsharp/Program.fs | 26 +++++ .../netcore20-console-fsharp.fsproj | 18 ++++ .../netcore20-console-fsharp.sln | 25 +++++ integrations/paket.dependencies | 1 + 35 files changed, 998 insertions(+) create mode 100644 integrations/net45-console-csharp/App.config create mode 100644 integrations/net45-console-csharp/Program.cs create mode 100644 integrations/net45-console-csharp/Properties/AssemblyInfo.cs create mode 100644 integrations/net45-console-csharp/net45-console-csharp.csproj create mode 100644 integrations/net45-console-csharp/net45-console-csharp.sln create mode 100644 integrations/net45-console-fsharp/App.config create mode 100644 integrations/net45-console-fsharp/AssemblyInfo.fs create mode 100644 integrations/net45-console-fsharp/Program.fs create mode 100644 integrations/net45-console-fsharp/net45-console-fsharp.fsproj create mode 100644 integrations/net45-console-fsharp/net45-console-fsharp.sln create mode 100644 integrations/net45-console-fsharp/packages.config create mode 100644 integrations/net471-console-csharp/App.config create mode 100644 integrations/net471-console-csharp/Program.cs create mode 100644 integrations/net471-console-csharp/Properties/AssemblyInfo.cs create mode 100644 integrations/net471-console-csharp/net471-console-csharp.csproj create mode 100644 integrations/net471-console-csharp/net471-console-csharp.sln create mode 100644 integrations/net471-console-fsharp/App.config create mode 100644 integrations/net471-console-fsharp/AssemblyInfo.fs create mode 100644 integrations/net471-console-fsharp/Program.fs create mode 100644 integrations/net471-console-fsharp/net471-console-fsharp.fsproj create mode 100644 integrations/net471-console-fsharp/net471-console-fsharp.sln create mode 100644 integrations/net471-console-fsharp/packages.config create mode 100644 integrations/netcore11-console-csharp/Program.cs create mode 100644 integrations/netcore11-console-csharp/netcore11-console-csharp.csproj create mode 100644 integrations/netcore11-console-csharp/netcore11-console-csharp.sln create mode 100644 integrations/netcore11-console-fsharp/Program.fs create mode 100644 integrations/netcore11-console-fsharp/netcore11-console-fsharp.fsproj create mode 100644 integrations/netcore11-console-fsharp/netcore11-console-fsharp.sln create mode 100644 integrations/netcore20-console-csharp/Program.cs create mode 100644 integrations/netcore20-console-csharp/netcore20-console-csharp.csproj create mode 100644 integrations/netcore20-console-csharp/netcore20-console-csharp.sln create mode 100644 integrations/netcore20-console-fsharp/Program.fs create mode 100644 integrations/netcore20-console-fsharp/netcore20-console-fsharp.fsproj create mode 100644 integrations/netcore20-console-fsharp/netcore20-console-fsharp.sln create mode 100644 integrations/paket.dependencies diff --git a/integrations/net45-console-csharp/App.config b/integrations/net45-console-csharp/App.config new file mode 100644 index 00000000..8e156463 --- /dev/null +++ b/integrations/net45-console-csharp/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/integrations/net45-console-csharp/Program.cs b/integrations/net45-console-csharp/Program.cs new file mode 100644 index 00000000..14521fb1 --- /dev/null +++ b/integrations/net45-console-csharp/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics; +using System.Numerics; + +using MathNet.Numerics; +using MathNet.Numerics.IntegralTransforms; +using MathNet.Numerics.LinearAlgebra; + +namespace Integration +{ + class Program + { + static void Main(string[] args) + { + // Code touching all providers + Control.UseNativeMKL(); + Matrix matrix = CreateMatrix.Random(10, 10, 100); + Vector vector = matrix.Svd().S; + Fourier.Forward(vector.AsArray()); + Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); + Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); + + if (Debugger.IsAttached) + { + Console.ReadKey(); + } + } + } +} diff --git a/integrations/net45-console-csharp/Properties/AssemblyInfo.cs b/integrations/net45-console-csharp/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..ad257530 --- /dev/null +++ b/integrations/net45-console-csharp/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("net45-console-csharp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("net45-console-csharp")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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("3d42354c-ceb7-4b35-856c-4a60e84f33e5")] + +// 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")] diff --git a/integrations/net45-console-csharp/net45-console-csharp.csproj b/integrations/net45-console-csharp/net45-console-csharp.csproj new file mode 100644 index 00000000..4d797e3c --- /dev/null +++ b/integrations/net45-console-csharp/net45-console-csharp.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {3D42354C-CEB7-4B35-856C-4A60E84F33E5} + Exe + Integration + net45-console-csharp + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + 4.0.0-beta05 + + + 2.2.0 + + + + diff --git a/integrations/net45-console-csharp/net45-console-csharp.sln b/integrations/net45-console-csharp/net45-console-csharp.sln new file mode 100644 index 00000000..0c9917e9 --- /dev/null +++ b/integrations/net45-console-csharp/net45-console-csharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net45-console-csharp", "net45-console-csharp.csproj", "{3D42354C-CEB7-4B35-856C-4A60E84F33E5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {90333CC7-17E3-4F3A-B74A-58A80FBA599C} + EndGlobalSection +EndGlobal diff --git a/integrations/net45-console-fsharp/App.config b/integrations/net45-console-fsharp/App.config new file mode 100644 index 00000000..8e156463 --- /dev/null +++ b/integrations/net45-console-fsharp/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/integrations/net45-console-fsharp/AssemblyInfo.fs b/integrations/net45-console-fsharp/AssemblyInfo.fs new file mode 100644 index 00000000..27bc9439 --- /dev/null +++ b/integrations/net45-console-fsharp/AssemblyInfo.fs @@ -0,0 +1,41 @@ +namespace net45_console_fsharp_nuget.AssemblyInfo + +open System.Reflection +open System.Runtime.CompilerServices +open 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. +[] +[] +[] +[] +[] +[] +[] +[] + +// 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. +[] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[] + +// 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: +// [] +[] +[] + +do + () \ No newline at end of file diff --git a/integrations/net45-console-fsharp/Program.fs b/integrations/net45-console-fsharp/Program.fs new file mode 100644 index 00000000..ac69a109 --- /dev/null +++ b/integrations/net45-console-fsharp/Program.fs @@ -0,0 +1,24 @@ +open System +open System.Diagnostics + +open MathNet.Numerics +open MathNet.Numerics.IntegralTransforms +open MathNet.Numerics.LinearAlgebra + +type Complex = System.Numerics.Complex + +[] +let main argv = + + // Code touching all providers + Control.UseNativeMKL() + let matrix : Matrix = DenseMatrix.randomSeed 10 10 100 + let vector = (matrix |> Matrix.svd).S + vector.AsArray() |> Fourier.Forward + printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider + printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude + + if Debugger.IsAttached then + Console.ReadKey() |> ignore + + 0 diff --git a/integrations/net45-console-fsharp/net45-console-fsharp.fsproj b/integrations/net45-console-fsharp/net45-console-fsharp.fsproj new file mode 100644 index 00000000..7ef993c7 --- /dev/null +++ b/integrations/net45-console-fsharp/net45-console-fsharp.fsproj @@ -0,0 +1,99 @@ + + + + + Debug + AnyCPU + 2.0 + 57ae8a51-a267-4336-a0e0-2b19fb69d7bd + Exe + net45_console_fsharp_nuget + net45_console_fsharp_nuget + v4.5 + true + true + 4.4.1.0 + net45-console-fsharp + + + + + true + full + false + false + bin\$(Configuration)\ + DEBUG;TRACE + 3 + AnyCPU + bin\$(Configuration)\$(AssemblyName).XML + true + + + pdbonly + true + true + bin\$(Configuration)\ + TRACE + 3 + AnyCPU + bin\$(Configuration)\$(AssemblyName).XML + true + + + 11 + + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + + + + + + + + + + packages\FSharp.Core.4.2.3\lib\net45\FSharp.Core.dll + + + packages\MathNet.Numerics.4.0.0-beta05\lib\net40\MathNet.Numerics.dll + + + packages\MathNet.Numerics.FSharp.4.0.0-beta05\lib\net45\MathNet.Numerics.FSharp.dll + + + + + + + + packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll + True + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/integrations/net45-console-fsharp/net45-console-fsharp.sln b/integrations/net45-console-fsharp/net45-console-fsharp.sln new file mode 100644 index 00000000..0588819a --- /dev/null +++ b/integrations/net45-console-fsharp/net45-console-fsharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "net45-console-fsharp", "net45-console-fsharp.fsproj", "{57AE8A51-A267-4336-A0E0-2B19FB69D7BD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AD34F735-19E3-4492-BA8C-5288DE2DE3F2} + EndGlobalSection +EndGlobal diff --git a/integrations/net45-console-fsharp/packages.config b/integrations/net45-console-fsharp/packages.config new file mode 100644 index 00000000..b5cf9f23 --- /dev/null +++ b/integrations/net45-console-fsharp/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/integrations/net471-console-csharp/App.config b/integrations/net471-console-csharp/App.config new file mode 100644 index 00000000..787dcbec --- /dev/null +++ b/integrations/net471-console-csharp/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/integrations/net471-console-csharp/Program.cs b/integrations/net471-console-csharp/Program.cs new file mode 100644 index 00000000..c07d2897 --- /dev/null +++ b/integrations/net471-console-csharp/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Diagnostics; +using System.Numerics; +using System.Runtime.InteropServices; + +using MathNet.Numerics; +using MathNet.Numerics.IntegralTransforms; +using MathNet.Numerics.LinearAlgebra; + +namespace Integration +{ + class Program + { + static void Main(string[] args) + { + // Code touching all providers + Control.UseNativeMKL(); + Matrix matrix = CreateMatrix.Random(10, 10, 100); + Vector vector = matrix.Svd().S; + Fourier.Forward(vector.AsArray()); + Console.WriteLine($"Framework={RuntimeInformation.FrameworkDescription}; OS={RuntimeInformation.OSDescription}"); + Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); + Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); + + if (Debugger.IsAttached) + { + Console.ReadKey(); + } + } + } +} diff --git a/integrations/net471-console-csharp/Properties/AssemblyInfo.cs b/integrations/net471-console-csharp/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..58dd1b4d --- /dev/null +++ b/integrations/net471-console-csharp/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("net471-console-csharp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("net471-console-csharp")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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("00241648-632e-4250-aff4-d61fe68d6dd4")] + +// 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")] diff --git a/integrations/net471-console-csharp/net471-console-csharp.csproj b/integrations/net471-console-csharp/net471-console-csharp.csproj new file mode 100644 index 00000000..51885cca --- /dev/null +++ b/integrations/net471-console-csharp/net471-console-csharp.csproj @@ -0,0 +1,60 @@ + + + + + Debug + AnyCPU + {00241648-632E-4250-AFF4-D61FE68D6DD4} + Exe + Integration + net471-console-csharp + v4.7.1 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + 4.0.0-beta05 + + + 2.2.0 + + + + \ No newline at end of file diff --git a/integrations/net471-console-csharp/net471-console-csharp.sln b/integrations/net471-console-csharp/net471-console-csharp.sln new file mode 100644 index 00000000..b1c419d4 --- /dev/null +++ b/integrations/net471-console-csharp/net471-console-csharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net471-console-csharp", "net471-console-csharp.csproj", "{00241648-632E-4250-AFF4-D61FE68D6DD4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {00241648-632E-4250-AFF4-D61FE68D6DD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00241648-632E-4250-AFF4-D61FE68D6DD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00241648-632E-4250-AFF4-D61FE68D6DD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00241648-632E-4250-AFF4-D61FE68D6DD4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {340791EB-C2C6-4604-9830-82AE33132081} + EndGlobalSection +EndGlobal diff --git a/integrations/net471-console-fsharp/App.config b/integrations/net471-console-fsharp/App.config new file mode 100644 index 00000000..787dcbec --- /dev/null +++ b/integrations/net471-console-fsharp/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/integrations/net471-console-fsharp/AssemblyInfo.fs b/integrations/net471-console-fsharp/AssemblyInfo.fs new file mode 100644 index 00000000..17c62d2f --- /dev/null +++ b/integrations/net471-console-fsharp/AssemblyInfo.fs @@ -0,0 +1,41 @@ +namespace net471_console_fsharp_nuget.AssemblyInfo + +open System.Reflection +open System.Runtime.CompilerServices +open 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. +[] +[] +[] +[] +[] +[] +[] +[] + +// 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. +[] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[] + +// 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: +// [] +[] +[] + +do + () \ No newline at end of file diff --git a/integrations/net471-console-fsharp/Program.fs b/integrations/net471-console-fsharp/Program.fs new file mode 100644 index 00000000..dd7f0aca --- /dev/null +++ b/integrations/net471-console-fsharp/Program.fs @@ -0,0 +1,26 @@ +open System +open System.Diagnostics +open System.Runtime.InteropServices + +open MathNet.Numerics +open MathNet.Numerics.IntegralTransforms +open MathNet.Numerics.LinearAlgebra + +type Complex = System.Numerics.Complex + +[] +let main argv = + + // Code touching all providers + Control.UseNativeMKL() + let matrix : Matrix = DenseMatrix.randomSeed 10 10 100 + let vector = (matrix |> Matrix.svd).S + vector.AsArray() |> Fourier.Forward + printfn "Framework=%s; OS=%s" RuntimeInformation.FrameworkDescription RuntimeInformation.OSDescription + printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider + printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude + + if Debugger.IsAttached then + Console.ReadKey() |> ignore + + 0 diff --git a/integrations/net471-console-fsharp/net471-console-fsharp.fsproj b/integrations/net471-console-fsharp/net471-console-fsharp.fsproj new file mode 100644 index 00000000..08ed6087 --- /dev/null +++ b/integrations/net471-console-fsharp/net471-console-fsharp.fsproj @@ -0,0 +1,98 @@ + + + + + Debug + AnyCPU + 2.0 + d1c0c7ca-6fcf-4c1f-a171-13ac06cc9708 + Exe + net471_console_fsharp_nuget + net471_console_fsharp_nuget + v4.7.1 + true + true + 4.4.1.0 + net471-console-fsharp + + + + + true + full + false + false + bin\$(Configuration)\ + DEBUG;TRACE + 3 + AnyCPU + bin\$(Configuration)\$(AssemblyName).XML + true + + + pdbonly + true + true + bin\$(Configuration)\ + TRACE + 3 + AnyCPU + bin\$(Configuration)\$(AssemblyName).XML + true + + + 11 + + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + + + + + + + + + + packages\FSharp.Core.4.2.3\lib\net45\FSharp.Core.dll + + + packages\MathNet.Numerics.4.0.0-beta05\lib\net40\MathNet.Numerics.dll + + + packages\MathNet.Numerics.FSharp.4.0.0-beta05\lib\net45\MathNet.Numerics.FSharp.dll + + + + + + + + True + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/integrations/net471-console-fsharp/net471-console-fsharp.sln b/integrations/net471-console-fsharp/net471-console-fsharp.sln new file mode 100644 index 00000000..ff622772 --- /dev/null +++ b/integrations/net471-console-fsharp/net471-console-fsharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "net471-console-fsharp", "net471-console-fsharp.fsproj", "{D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FCBC8B65-5683-4390-A0E2-39BE8B288555} + EndGlobalSection +EndGlobal diff --git a/integrations/net471-console-fsharp/packages.config b/integrations/net471-console-fsharp/packages.config new file mode 100644 index 00000000..63c37788 --- /dev/null +++ b/integrations/net471-console-fsharp/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/integrations/netcore11-console-csharp/Program.cs b/integrations/netcore11-console-csharp/Program.cs new file mode 100644 index 00000000..0871d593 --- /dev/null +++ b/integrations/netcore11-console-csharp/Program.cs @@ -0,0 +1,32 @@ +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +using MathNet.Numerics; +using MathNet.Numerics.IntegralTransforms; +using MathNet.Numerics.LinearAlgebra; + +using Complex = System.Numerics.Complex; + +namespace Integration +{ + class Program + { + static void Main(string[] args) + { + // Code touching all providers + Control.UseManaged(); + Matrix matrix = CreateMatrix.Random(10, 10, 100); + Vector vector = matrix.Svd().S; + Fourier.Forward(vector.AsArray()); + Console.WriteLine($"Framework={RuntimeInformation.FrameworkDescription}; OS={RuntimeInformation.OSDescription}"); + Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); + Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); + + if (Debugger.IsAttached) + { + Console.ReadKey(); + } + } + } +} diff --git a/integrations/netcore11-console-csharp/netcore11-console-csharp.csproj b/integrations/netcore11-console-csharp/netcore11-console-csharp.csproj new file mode 100644 index 00000000..0c214589 --- /dev/null +++ b/integrations/netcore11-console-csharp/netcore11-console-csharp.csproj @@ -0,0 +1,13 @@ + + + + Exe + netcoreapp1.1 + Integration + + + + + + + diff --git a/integrations/netcore11-console-csharp/netcore11-console-csharp.sln b/integrations/netcore11-console-csharp/netcore11-console-csharp.sln new file mode 100644 index 00000000..63845349 --- /dev/null +++ b/integrations/netcore11-console-csharp/netcore11-console-csharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "netcore11-console-csharp", "netcore11-console-csharp.csproj", "{108E9AB0-757E-4A6F-AF7D-012129F34EF0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {09849DBB-34DE-4146-A8DC-0DCB096103BE} + EndGlobalSection +EndGlobal diff --git a/integrations/netcore11-console-fsharp/Program.fs b/integrations/netcore11-console-fsharp/Program.fs new file mode 100644 index 00000000..47af4d2d --- /dev/null +++ b/integrations/netcore11-console-fsharp/Program.fs @@ -0,0 +1,25 @@ +open System +open System.Diagnostics +open System.Runtime.InteropServices + +open MathNet.Numerics +open MathNet.Numerics.IntegralTransforms +open MathNet.Numerics.LinearAlgebra + +type Complex = System.Numerics.Complex + +[] +let main argv = + + // Code touching all providers + let matrix : Matrix = DenseMatrix.randomSeed 10 10 100 + let vector = (matrix |> Matrix.svd).S + vector.AsArray() |> Fourier.Forward + printfn "Framework=%s; OS=%s" RuntimeInformation.FrameworkDescription RuntimeInformation.OSDescription + printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider + printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude + + if Debugger.IsAttached then + Console.ReadKey() |> ignore + + 0 diff --git a/integrations/netcore11-console-fsharp/netcore11-console-fsharp.fsproj b/integrations/netcore11-console-fsharp/netcore11-console-fsharp.fsproj new file mode 100644 index 00000000..e16f92ef --- /dev/null +++ b/integrations/netcore11-console-fsharp/netcore11-console-fsharp.fsproj @@ -0,0 +1,17 @@ + + + + Exe + netcoreapp1.1 + + + + + + + + + + + + diff --git a/integrations/netcore11-console-fsharp/netcore11-console-fsharp.sln b/integrations/netcore11-console-fsharp/netcore11-console-fsharp.sln new file mode 100644 index 00000000..36ad442f --- /dev/null +++ b/integrations/netcore11-console-fsharp/netcore11-console-fsharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "netcore11-console-fsharp", "netcore11-console-fsharp.fsproj", "{7F0FCBE3-106E-477C-8198-50EDE1729F69}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7F0FCBE3-106E-477C-8198-50EDE1729F69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F0FCBE3-106E-477C-8198-50EDE1729F69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F0FCBE3-106E-477C-8198-50EDE1729F69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F0FCBE3-106E-477C-8198-50EDE1729F69}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {831812CF-1BE1-414F-9074-90A785F0013F} + EndGlobalSection +EndGlobal diff --git a/integrations/netcore20-console-csharp/Program.cs b/integrations/netcore20-console-csharp/Program.cs new file mode 100644 index 00000000..7a3d7b20 --- /dev/null +++ b/integrations/netcore20-console-csharp/Program.cs @@ -0,0 +1,32 @@ +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +using MathNet.Numerics; +using MathNet.Numerics.IntegralTransforms; +using MathNet.Numerics.LinearAlgebra; + +using Complex = System.Numerics.Complex; + +namespace Integration +{ + class Program + { + static void Main(string[] args) + { + // Code touching all providers + Control.UseNativeMKL(); + Matrix matrix = CreateMatrix.Random(10, 10, 100); + Vector vector = matrix.Svd().S; + Fourier.Forward(vector.AsArray()); + Console.WriteLine($"Framework={RuntimeInformation.FrameworkDescription}; OS={RuntimeInformation.OSDescription}"); + Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); + Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); + + if (Debugger.IsAttached) + { + Console.ReadKey(); + } + } + } +} diff --git a/integrations/netcore20-console-csharp/netcore20-console-csharp.csproj b/integrations/netcore20-console-csharp/netcore20-console-csharp.csproj new file mode 100644 index 00000000..63a799f6 --- /dev/null +++ b/integrations/netcore20-console-csharp/netcore20-console-csharp.csproj @@ -0,0 +1,14 @@ + + + + Exe + netcoreapp2.0 + Integration + + + + + + + + diff --git a/integrations/netcore20-console-csharp/netcore20-console-csharp.sln b/integrations/netcore20-console-csharp/netcore20-console-csharp.sln new file mode 100644 index 00000000..ef5a13af --- /dev/null +++ b/integrations/netcore20-console-csharp/netcore20-console-csharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "netcore20-console-csharp", "netcore20-console-csharp.csproj", "{B0146BC4-789E-4EC1-9FA8-F93378928B11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0146BC4-789E-4EC1-9FA8-F93378928B11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0146BC4-789E-4EC1-9FA8-F93378928B11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0146BC4-789E-4EC1-9FA8-F93378928B11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0146BC4-789E-4EC1-9FA8-F93378928B11}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {370FB300-76E3-40CC-9399-A1A9DB2F7F9E} + EndGlobalSection +EndGlobal diff --git a/integrations/netcore20-console-fsharp/Program.fs b/integrations/netcore20-console-fsharp/Program.fs new file mode 100644 index 00000000..dd7f0aca --- /dev/null +++ b/integrations/netcore20-console-fsharp/Program.fs @@ -0,0 +1,26 @@ +open System +open System.Diagnostics +open System.Runtime.InteropServices + +open MathNet.Numerics +open MathNet.Numerics.IntegralTransforms +open MathNet.Numerics.LinearAlgebra + +type Complex = System.Numerics.Complex + +[] +let main argv = + + // Code touching all providers + Control.UseNativeMKL() + let matrix : Matrix = DenseMatrix.randomSeed 10 10 100 + let vector = (matrix |> Matrix.svd).S + vector.AsArray() |> Fourier.Forward + printfn "Framework=%s; OS=%s" RuntimeInformation.FrameworkDescription RuntimeInformation.OSDescription + printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider + printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude + + if Debugger.IsAttached then + Console.ReadKey() |> ignore + + 0 diff --git a/integrations/netcore20-console-fsharp/netcore20-console-fsharp.fsproj b/integrations/netcore20-console-fsharp/netcore20-console-fsharp.fsproj new file mode 100644 index 00000000..a2dc9463 --- /dev/null +++ b/integrations/netcore20-console-fsharp/netcore20-console-fsharp.fsproj @@ -0,0 +1,18 @@ + + + + Exe + netcoreapp2.0 + + + + + + + + + + + + + diff --git a/integrations/netcore20-console-fsharp/netcore20-console-fsharp.sln b/integrations/netcore20-console-fsharp/netcore20-console-fsharp.sln new file mode 100644 index 00000000..52c557bf --- /dev/null +++ b/integrations/netcore20-console-fsharp/netcore20-console-fsharp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "netcore20-console-fsharp", "netcore20-console-fsharp.fsproj", "{5B271DEE-042F-4F7E-B7F8-BA60FB466236}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {41F46975-2B6E-4B46-9E01-A17675D97BC8} + EndGlobalSection +EndGlobal diff --git a/integrations/paket.dependencies b/integrations/paket.dependencies new file mode 100644 index 00000000..88497543 --- /dev/null +++ b/integrations/paket.dependencies @@ -0,0 +1 @@ +# this folder shall not be in scope of the parent Paket resolution