Skip to content
Snippets Groups Projects
Commit a27797e1 authored by Radek Hušek's avatar Radek Hušek Committed by Radek Hušek
Browse files

Move nextForb

parent 5cc9577f
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,22 @@ struct Tester : public AbstractTester {
}
}
#if !USE_NEXT_FORB
#if USE_NEXT_FORB
bool nextForb(Mapping& forb) {
for (size_t i = 0; i < edges; i++) {
T v = forb[i] + 1;
if (v >= Ring::size) {
forb.assign(i, 1);
} else {
forb.assign(i, v);
return true;
}
}
return false;
}
#else // !USE_NEXT_FORB
Mapping& unpack(size_t index, Mapping& ret) {
size_t m = Ring::size - 1;
......@@ -90,6 +105,7 @@ struct Tester : public AbstractTester {
}
#endif
Mapping& cannonize(Mapping& map) {
for (const auto &i : nonClassEdges) {
#if OPTIMIZE_COMBINE
......@@ -123,21 +139,7 @@ struct Tester : public AbstractTester {
#endif
}
#if USE_NEXT_FORB
bool nextForb(Mapping& forb) {
for (size_t i = 0; i < edges; i++) {
T v = forb[i] + 1;
if (v >= Ring::size) {
forb.assign(i, 1);
} else {
forb.assign(i, v);
return true;
}
}
return false;
}
#endif
virtual bool run() {
# if SAVE_MEMORY
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment