Skip to content

Commit ec9e4ab

Browse files
committed
Control.Describe to include CPU architecture and identifier if known
1 parent 9c29b4c commit ec9e4ab

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

src/Numerics/Control.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,21 @@
2828
// </copyright>
2929

3030
using System;
31-
using System.Linq;
3231
using System.Reflection;
33-
using System.Runtime.InteropServices;
3432
using System.Text;
3533
using System.Threading.Tasks;
3634
using MathNet.Numerics.Providers.SparseSolver;
3735
using MathNet.Numerics.Providers.FourierTransform;
3836
using MathNet.Numerics.Providers.LinearAlgebra;
3937

38+
#if NET40
39+
using System.Linq;
40+
#endif
41+
42+
#if !NET40 && !NET461
43+
using System.Runtime.InteropServices;
44+
#endif
45+
4046
namespace MathNet.Numerics
4147
{
4248
/// <summary>
@@ -346,6 +352,17 @@ public static string Describe()
346352
sb.AppendLine($"Framework: {RuntimeInformation.FrameworkDescription}");
347353
sb.AppendLine($"Process Architecture: {RuntimeInformation.ProcessArchitecture}");
348354
#endif
355+
var processorArchitecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
356+
if (!String.IsNullOrEmpty(processorArchitecture))
357+
{
358+
sb.AppendLine($"Processor Architecture: {processorArchitecture}");
359+
}
360+
var processorId = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER");
361+
if (!String.IsNullOrEmpty(processorId))
362+
{
363+
sb.AppendLine($"Processor Identifier: {processorId}");
364+
}
365+
349366
return sb.ToString();
350367
}
351368
}

0 commit comments

Comments
 (0)