aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-12-09 08:36:06 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-12-09 08:36:06 +0100
commitd8a94976ebad9c55aca6b0443c5f92d892e12dd0 (patch)
treebe324b0920517e4aea72235c936cb26f59679ae8 /src
parenta0a229768a0adba0c7ac0b522a2c7d46a838c6fa (diff)
downloadnissy-d8a94976ebad9c55aca6b0443c5f92d892e12dd0.tar.gz
nissy-d8a94976ebad9c55aca6b0443c5f92d892e12dd0.zip
Fixed genptable for small tables and tables that do not use symmetry
Diffstat (limited to '')
-rw-r--r--src/pruning.c6
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
6static int findchunk(PruneData *pd, int nchunks, uint64_t i); 7static 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);

Generated with cgit - Back to sebastiano.tronto.net