int main (int argc, char* argv[]) {
int result = 0;
numtype numarray[NUMBERS];
- int countarray[NUMBERS];
+ //unsigned int countarray[NUMBERS];
int i;
double startTime, endTime;
for (i = 0; i < NUMBERS; i++) {
numarray[i] = 10;
- countarray[i] = 0;
+ //countarray[i] = 0;
}
startTime = omp_get_wtime();
printf ("calling algorithm 1:");
- algorithm_1(numarray, NUMBERS, countarray);
+ algorithm_1(numarray, NUMBERS, NULL);
printf ("sum: %i\n", numarray[NUMBERS-1]);
endTime = omp_get_wtime();
printf("took %f seconds.\n", endTime-startTime);
startTime = omp_get_wtime();
printf ("calling algorithm 2:");
- result = algorithm_2(numarray, NUMBERS, countarray);
+ result = algorithm_2(numarray, NUMBERS, NULL);
printf ("sum: %i\n", result);
endTime = omp_get_wtime();
printf("took %f seconds.\n", endTime-startTime);
startTime = omp_get_wtime();
printf ("calling algorithm 3:");
- result = algorithm_3(numarray, NUMBERS, countarray);
+ result = algorithm_3(numarray, NUMBERS, NULL);
printf ("sum: %i\n", result);
endTime = omp_get_wtime();
printf("took %f seconds.\n", endTime-startTime);