Skip to content

Commit

Permalink
fix simplesolve
Browse files Browse the repository at this point in the history
  • Loading branch information
tromp committed Oct 2, 2018
1 parent a91e67a commit c115255
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions doc/simplesolve
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
void count_node_deg(u32 uorv) {
for (edge_t nonce = 0; nonce < NEDGES; nonce++) {
if (alive(nonce)) {
nonleaf.set(sipnode(sip_keys, nonce, uorv));
}
}
void count_node_deg(u32 uorv) {
for (edge_t nonce = 0; nonce < NEDGES; nonce++) {
if (alive(nonce)) {
nonleaf.set(sipnode(sip_keys, nonce, uorv));
}
void kill_leaf_edges(u32 uorv) {
for (edge_t nonce = 0; nonce < NEDGES; nonce++) {
if (alive(nonce)) {
if (!nonleaf.test(sipnode(sip_keys, nonce, uorv)))
alive.reset(nonce);
}
}
}
}

void kill_leaf_edges(u32 uorv) {
for (edge_t nonce = 0; nonce < NEDGES; nonce++) {
if (alive(nonce)) {
if (!nonleaf.test(sipnode(sip_keys, nonce, uorv) ^ 1))
alive.reset(nonce);
}

for (u32 round=0; round < trims; round++) {
for (u32 uorv = 0; uorv < 2; uorv++) {
memset(nonleaf.bits, 0, nodeBytes));
count_node_deg(uorv);
kill_leaf_edges(uorv);
}
}
}
}

for (u32 round=0; round < trims; round++) {
for (u32 uorv = 0; uorv < 2; uorv++) {
memset(nonleaf.bits, 0, nodeBytes));
count_node_deg(uorv);
kill_leaf_edges(uorv);
}
}

0 comments on commit c115255

Please sign in to comment.