Skip to content
Snippets Groups Projects
Commit bc859aac authored by Barbariansyah's avatar Barbariansyah
Browse files

bersihin bekas openmp

parent 2275310e
No related merge requests found
......@@ -7,30 +7,28 @@ long int *calculate_sub_matrix(long int *matrix, int node_count);
int main(int argc, char *argv[])
{
int thread_count = strtol(argv[1], NULL, 10);
// int thread_count = strtol(argv[1], NULL, 10);
char print_dist;
setvbuf(stdout, NULL, _IONBF, 0);
srand(13517003);
if (argc < 2)
{
printf("usage: main <num_of_nodes>");
exit(-1);
}
// if (argc < 2)
// {
// printf("usage: main <num_of_nodes>");
// exit(-1);
// }
int node_count = atoi(argv[2]);
int node_count = atoi(argv[1]);
long int *adj_matrix = create_adj_matrix(node_count, node_count);
double start_time = omp_get_wtime();
long int *sub_dist = calculate_sub_matrix(adj_matrix, node_count);
double time = omp_get_wtime() - start_time;
printf("Elapsed Time : %f\n", time*1000000);
printf("Print distances to stdout? [y/N] ");
scanf("%c", &print_dist);
print_matrix_to_file(sub_dist, node_count, node_count, argv[3]);
print_matrix_to_file(sub_dist, node_count, node_count, argv[2]);
if (print_dist == 'y' || print_dist == 'Y')
{
print_matrix(sub_dist, node_count, node_count);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment