change the argument ordering

This commit is contained in:
Heng Li 2013-10-11 09:34:42 -04:00
parent 007ef52ce4
commit 08fdd05b31
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ static void *ktf_worker(void *data)
pthread_exit(0);
}
void kt_for(int n_threads, void (*func)(void*,int,int), void *data, int n)
void kt_for(int n_threads, int n, void (*func)(void*,int,int), void *data)
{
int i;
kt_for_t t;

View File

@ -32,7 +32,7 @@ static void compute(void *_g, int i, int tid)
g->k[i] = k;
}
void kt_for(int n_threads, void (*func)(void*,int,int), void *data, int n_items);
void kt_for(int n_threads, int n_items, void (*func)(void*,int,int), void *data);
int main(int argc, char *argv[])
{
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
global.k = calloc(tot, sizeof(int));
for (i = 0; i < tot; ++i) global.k[i] = -1;
if (type == 0) {
kt_for(n_threads, compute, &global, tot);
kt_for(n_threads, tot, compute, &global);
} else if (type == 2) {
#pragma omp parallel for
for (i = 0; i < tot; ++i)