4 #include "algorithm_1.h"
5 #include "algorithm_2.h"
6 #include "algorithm_3.h"
8 int main (int argc, char* argv[]) {
13 double startTime, endTime;
15 for (i = 0; i < 5; i++) {
20 startTime = omp_get_wtime();
21 printf ("calling algorithm 1:");
22 result = algorithm_1(numarray, 5, countarray);
23 printf ("sum: %i\n", result);
24 endTime = omp_get_wtime();
25 printf("took %f seconds.\n", endTime-startTime);
27 startTime = omp_get_wtime();
28 printf ("calling algorithm 2:");
29 result = algorithm_2(numarray, 5, countarray);
30 printf ("sum: %i\n", result);
31 endTime = omp_get_wtime();
32 printf("took %f seconds.\n", endTime-startTime);
34 startTime = omp_get_wtime();
35 printf ("calling algorithm 3:");
36 result = algorithm_3(numarray, 5, countarray);
37 printf ("sum: %i\n", result);
38 endTime = omp_get_wtime();
39 printf("took %f seconds.\n", endTime-startTime);