Skip to content

Commit 139e6d5

Browse files
...
1 parent 60b422a commit 139e6d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+834
-11339
lines changed

Examples/SuperchargedArray.Testing/BasicExample.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public static void RunArraySimplified()
5959
//NDArray b = new NDArray(3, 2);
6060
b.Fill(2);
6161

62+
var sum = a + b;
6263
//Perform Math operation on the array: 2A + Log(B) + Exp(A)
6364
var r = 2 * a - K.Log(b) + K.Exp(a);
6465

Examples/SuperchargedArray.Testing/PerfTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void Run()
3030
RunStandardLoop(count, a, b);
3131
Console.WriteLine();
3232

33-
var devices = Accelerator.Devices;
33+
var devices = Global.Compiler.Devices;
3434
foreach (var item in devices)
3535
{
3636
RunArrayAccelerated(count, a, b, item.ID);
@@ -78,7 +78,7 @@ public void RunArrayAccelerated(int count, SuperArray a, SuperArray b, int devic
7878
{
7979
try
8080
{
81-
Accelerator.UseDevice(deviceid);
81+
Global.UseAmplifier(deviceid);
8282
Stopwatch sw = new Stopwatch();
8383
sw.Start();
8484

@@ -94,7 +94,7 @@ public void RunArrayAccelerated(int count, SuperArray a, SuperArray b, int devic
9494
Console.WriteLine("Error: " + ex.Message);
9595
}
9696

97-
Accelerator.Dispose();
97+
Global.Compiler.Dispose();
9898
}
9999
}
100100
}

Examples/SuperchargedArray.Testing/Program.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
using SuperchargedArray;
2+
using System;
23
using System.Collections.Generic;
34
using System.IO;
45

@@ -11,19 +12,10 @@ static void Main(string[] args)
1112
try
1213
{
1314
new PerfTest().Run();
14-
//System.ArrayExtension.Accelerated.Global.UseDefault();
15-
16-
//NDArray x = new NDArray(new long[] { 3, 3 }, DType.Single);
17-
//x.LoadFrom(new float[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });
18-
19-
//NDArray y = new float[,] { { 9, 8, 7 }, { 6, 5, 4 }, { 3, 2, 1 } };
20-
21-
//var r = x + y;
22-
//r.Print();
23-
15+
//Global.UseAmplifier(0);
2416
//BasicExample.RunStandard();
2517
//BasicExample.RunArraySimplified();
26-
18+
2719
}
2820
catch (Exception e)
2921
{

SuperchargedArray.sln

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28307.489
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29001.49
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{D6D26AE3-3049-476D-8014-2256876294B8}"
77
EndProject
@@ -16,6 +16,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__", "__", "{C707FDE0-1468-
1616
README.md = README.md
1717
EndProjectSection
1818
EndProject
19+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amplifier", "..\Amplifier.NET\Amplifier.Net\Amplifier.csproj", "{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}"
20+
EndProject
1921
Global
2022
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2123
Debug|Any CPU = Debug|Any CPU
@@ -40,6 +42,14 @@ Global
4042
{B87AA65D-77BF-47A8-B3F9-AC4ED142B89B}.Release|Any CPU.Build.0 = Release|Any CPU
4143
{B87AA65D-77BF-47A8-B3F9-AC4ED142B89B}.Release|x64.ActiveCfg = Release|x64
4244
{B87AA65D-77BF-47A8-B3F9-AC4ED142B89B}.Release|x64.Build.0 = Release|x64
45+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Debug|x64.ActiveCfg = Debug|Any CPU
48+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Debug|x64.Build.0 = Debug|Any CPU
49+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
50+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Release|Any CPU.Build.0 = Release|Any CPU
51+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Release|x64.ActiveCfg = Release|Any CPU
52+
{CBE45F33-3C4A-4736-802C-B2BF40A1DD0C}.Release|x64.Build.0 = Release|Any CPU
4353
EndGlobalSection
4454
GlobalSection(SolutionProperties) = preSolution
4555
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)