-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
32 lines (29 loc) · 898 Bytes
/
Copy pathProgram.cs
File metadata and controls
32 lines (29 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using ilgpuapp.Util;
namespace ilgpuapp;
public static class Program
{
public static void Main(string[] args)
{
var graph = GraphGenerator.Generate(2000, 100);
_ = FloydWarshalGpuRunner.Run(graph);
_ = FloydWarshalCPUParallelRunner.Run(graph);
_ = FloydWarshallSingleThreadRunner.Run(graph);
//PrintMatrix(mat1, mat1.GetLength(0));
//PrintMatrix(mat2, mat2.GetLength(0));
//PrintMatrix(mat3, mat3.GetLength(0));
}
static void PrintMatrix(int[,] matrix, int size)
{
for (int i = 0; i < size; i++)
{
for (int j = 0; j < size; j++)
{
if (matrix[i, j] == int.MaxValue)
Console.Write("INF\t");
else
Console.Write(matrix[i, j] + "\t");
}
Console.WriteLine();
}
}
}