diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pruning.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pruning.c b/src/pruning.c index f61912c..8cfa582 100644 --- a/src/pruning.c +++ b/src/pruning.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #include "pruning.h" | 1 | #include "pruning.h" |
| 2 | 2 | ||
| 3 | /* Chunks for multithreading */ | 3 | /* Chunks for multithreading */ |
| 4 | /* TODO: try smaller */ | ||
| 4 | #define NCHUNKS 100000 | 5 | #define NCHUNKS 100000 |
| 5 | 6 | ||
| 6 | static int findchunk(PruneData *pd, int nchunks, uint64_t i); | 7 | static int findchunk(PruneData *pd, int nchunks, uint64_t i); |
| @@ -114,7 +115,7 @@ genptable(PruneData *pd, int nthreads) | |||
| 114 | } | 115 | } |
| 115 | pd->generated = true; | 116 | pd->generated = true; |
| 116 | 117 | ||
| 117 | nchunks = MIN(pd->coord->max, NCHUNKS); | 118 | nchunks = MIN(pd->coord->max/2, NCHUNKS); |
| 118 | fprintf(stderr, "Cannot load %s, generating it " | 119 | fprintf(stderr, "Cannot load %s, generating it " |
| 119 | "with %d threads and %d chunks\n", | 120 | "with %d threads and %d chunks\n", |
| 120 | pd->filename, nthreads, nchunks); | 121 | pd->filename, nthreads, nchunks); |
| @@ -193,6 +194,9 @@ genptable_fixnasty(PruneData *pd, int d) | |||
| 193 | Cube c, cc; | 194 | Cube c, cc; |
| 194 | Trans t[NTRANS]; | 195 | Trans t[NTRANS]; |
| 195 | 196 | ||
| 197 | if (pd->coord->trans == NULL) | ||
| 198 | return; | ||
| 199 | |||
| 196 | for (i = 0; i < pd->coord->max; i++) { | 200 | for (i = 0; i < pd->coord->max; i++) { |
| 197 | if (ptableval_index(pd, i) == d) { | 201 | if (ptableval_index(pd, i) == d) { |
| 198 | n = pd->coord->trans(i, t); | 202 | n = pd->coord->trans(i, t); |
