mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 22:35:44 +00:00
prune paths that don't match initial conv state
This commit is contained in:
parent
67355dbdb3
commit
da6f94b7ad
1 changed files with 10 additions and 1 deletions
|
|
@ -152,12 +152,21 @@ public:
|
|||
default: assert(false);
|
||||
}
|
||||
|
||||
for (int i = 0; i < TYPE::SIZE; ++i)
|
||||
if (((state[i] & 8064) >> 7) != ((state[i] & 126) >> 1))
|
||||
metric[i] += 1000000;
|
||||
int perm[TYPE::SIZE];
|
||||
CODE::insertion_sort(perm, metric, TYPE::SIZE);
|
||||
for (int i = 0, r = 0; rank != nullptr && i < TYPE::SIZE; ++i) {
|
||||
if (i > 0 && metric[i-1] != metric[i])
|
||||
++r;
|
||||
rank[i] = r;
|
||||
}
|
||||
MAP acc = maps[count-1];
|
||||
MAP acc;
|
||||
for (int k = 0; k < TYPE::SIZE; ++k)
|
||||
acc.v[k] = perm[k];
|
||||
message[count-1] = vshuf(message[count-1], acc);
|
||||
acc = vshuf(maps[count-1], acc);
|
||||
for (int i = count-2; i >= 0; --i) {
|
||||
message[i] = vshuf(message[i], acc);
|
||||
acc = vshuf(maps[i], acc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue