-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
23 lines (20 loc) · 1.49 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stdio.h>
#include <iterator>
#include <time.h>
#include <limits.h>
using namespace std;
// bellman ford algorithm
void sequentialBellmanFord(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, vector<int> &distances);
int runBellmanFordOnCPU(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, string output_file, float &msecs_cpu);
int runBellmanFordOnGPU(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, int block_size, string output_file, float &msecs_gpu);
int runBellmanFordOnGPUGridStride(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, int block_size, string output_file, float &msecs_gpu_gs);
// dijkstra's algorithm
void sequentialDijkstras(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, vector<int> &distances);
int runDijkstrasOnCPU(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, string output_file, float &msecs_cpu);
int runDijkstrasOnGPU(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, int block_size, string output_file, float &msecs_gpu);
int runDijkstrasOnGPUGridStride(vector<int> adj_list, vector<int> adj_offset_list, vector<int> weights, int numVertices, int block_size, string output_file, float &msecs_gpu_gs);