mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
use signed int for openmp for loop
This commit is contained in:
parent
9451beb977
commit
42f56b62ac
@ -52,7 +52,7 @@ int main(int argc, char **argv)
|
|||||||
char *flags = (char *)calloc(MAX_N, sizeof(char));
|
char *flags = (char *)calloc(MAX_N, sizeof(char));
|
||||||
|
|
||||||
clock_t start_time = clock();
|
clock_t start_time = clock();
|
||||||
unsigned int i;
|
int i;
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp for schedule(runtime)
|
#pragma omp for schedule(runtime)
|
||||||
#endif
|
#endif
|
||||||
|
@ -110,7 +110,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
long sum_score = 0;
|
long sum_score = 0;
|
||||||
clock_t start_time = clock();
|
clock_t start_time = clock();
|
||||||
unsigned int i;
|
int i;
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for schedule(runtime) reduction(+ \
|
#pragma omp parallel for schedule(runtime) reduction(+ \
|
||||||
|
@ -92,7 +92,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
double total_duration = 0;
|
double total_duration = 0;
|
||||||
unsigned long i;
|
long i;
|
||||||
function_timer *timer = new_timer();
|
function_timer *timer = new_timer();
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for reduction(+ \
|
#pragma omp parallel for reduction(+ \
|
||||||
|
@ -120,7 +120,7 @@ int main(int argc, char **argv)
|
|||||||
clock_t start_time = clock();
|
clock_t start_time = clock();
|
||||||
|
|
||||||
/* Loop to set abundant flags */
|
/* Loop to set abundant flags */
|
||||||
unsigned long N;
|
long N;
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp for schedule(runtime)
|
#pragma omp for schedule(runtime)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user