Skip to content

Commit

Permalink
use signed int for openmp for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
kvedala committed Apr 24, 2020
1 parent 9451beb commit 42f56b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion project_euler/Problem 21/sol1.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char **argv)
char *flags = (char *)calloc(MAX_N, sizeof(char));

clock_t start_time = clock();
unsigned int i;
int i;
#ifdef _OPENMP
#pragma omp for schedule(runtime)
#endif
Expand Down
2 changes: 1 addition & 1 deletion project_euler/Problem 22/sol1.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int main(int argc, char **argv)

long sum_score = 0;
clock_t start_time = clock();
unsigned int i;
int i;

#ifdef _OPENMP
#pragma omp parallel for schedule(runtime) reduction(+ \
Expand Down
2 changes: 1 addition & 1 deletion project_euler/Problem 23/sol1.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int main(int argc, char **argv)
#endif

double total_duration = 0;
unsigned long i;
long i;
function_timer *timer = new_timer();
#ifdef _OPENMP
#pragma omp parallel for reduction(+ \
Expand Down
2 changes: 1 addition & 1 deletion project_euler/Problem 23/sol2.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int main(int argc, char **argv)
clock_t start_time = clock();

/* Loop to set abundant flags */
unsigned long N;
long N;
#ifdef _OPENMP
#pragma omp for schedule(runtime)
#endif
Expand Down

0 comments on commit 42f56b6

Please sign in to comment.