Skip to content

Commit

Permalink
aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
philiprbrenan committed Feb 2, 2025
1 parent 3f27059 commit 68a3f66
Show file tree
Hide file tree
Showing 117 changed files with 431,985 additions and 490,994 deletions.
75 changes: 40 additions & 35 deletions BtreePA.java
Original file line number Diff line number Diff line change
Expand Up @@ -1123,13 +1123,16 @@ private void splitBranch() //
tt(node_branchBase2, l); branchBase2(); bL.base(T.at(branchBase2)); // The branch being split into
tt(node_branchBase3, node_splitBranch); branchBase3(); bR.base(T.at(branchBase3)); // The branch being split

for (int i = 0; i < splitBranchSize; i++) // Build left branch from right
{z(); bR.shift();
M.moveParallel
(bL.T.at(bL.tKey ), bR.T.at(bR.tKey ), /// Parallel possible
bL.T.at(bL.tData), bR.T.at(bR.tData));
bL.push();
}
// for (int i = 0; i < splitBranchSize; i++) // Build left branch from right
// {z(); bR.shift();
// M.moveParallel
// (bL.T.at(bL.tKey ), bR.T.at(bR.tKey ), /// Parallel possible
// bL.T.at(bL.tData), bR.T.at(bR.tData));
// bL.push();
// }

bR.splitLow(bL);

bR.shift();
bL.T.at(bL.tKey ).zero();
bL.T.at(bL.tData).move(bR.T.at(bR.tData));
Expand Down Expand Up @@ -1403,31 +1406,33 @@ P.new If (T.at(mergeable))
T.at(node_leafBase1).zero(); leafBase1(); lT.base(T.at(leafBase1));
tt(node_leafBase2, l); leafBase2(); lL.base(T.at(leafBase2));
tt(node_leafBase3, r); leafBase3(); lR.base(T.at(leafBase3));
P.new Block()
{void code()
{for (int i = 0; i < maxKeysPerLeaf(); ++i) // Merge in left child leaf
{tt(node_isEmpty, l); isEmpty(); P.GoOn(end,T.at(isEmpty));// Stop when left leaf child is empty
lL.shift();
M.moveParallel
(lT.T.at(lT.tKey ), lL.T.at(lL.tKey), /// Parallel possible
lT.T.at(lT.tData), lL.T.at(lL.tData));
lT.push();
}
}
};

P.new Block()
{void code()
{for (int i = 0; i < maxKeysPerLeaf(); ++i) // Merge in right child leaf
{tt(node_isEmpty, r); isEmpty(); P.GoOn(end,T.at(isEmpty));// Stop when right leaf child is empty
lR.shift();
M.moveParallel
(lT.T.at(lT.tKey ), lR.T.at(lR.tKey), /// Parallel possible
lT.T.at(lT.tData), lR.T.at(lR.tData));
lT.push();
}
}
};
// P.new Block()
// {void code()
// {for (int i = 0; i < maxKeysPerLeaf(); ++i) // Merge in left child leaf
// {tt(node_isEmpty, l); isEmpty(); P.GoOn(end,T.at(isEmpty));// Stop when left leaf child is empty
// lL.shift();
// M.moveParallel
// (lT.T.at(lT.tKey ), lL.T.at(lL.tKey), /// Parallel possible
// lT.T.at(lT.tData), lL.T.at(lL.tData));
// lT.push();
// }
// }
// };
//
// P.new Block()
// {void code()
// {for (int i = 0; i < maxKeysPerLeaf(); ++i) // Merge in right child leaf
// {tt(node_isEmpty, r); isEmpty(); P.GoOn(end,T.at(isEmpty));// Stop when right leaf child is empty
// lR.shift();
// M.moveParallel
// (lT.T.at(lT.tKey ), lR.T.at(lR.tKey), /// Parallel possible
// lT.T.at(lT.tData), lR.T.at(lR.tData));
// lT.push();
// }
// }
// };
lT.concatenate(lL); // Merge in left child leaf
lT.concatenate(lR); // Merge in right child leaf
T.setIntInstruction(node_setLeaf, root); setLeaf(); // The root is now a leaf
tt(node_free, l); free(); // Free the children
tt(node_free, r); free();
Expand Down Expand Up @@ -3429,7 +3434,7 @@ static void test_verilog_delete() //
7=1 8,9=2 |
""");

t.runVerilogDeleteTest(7, 2, 554, """
t.runVerilogDeleteTest(7, 2, 462, """
8,9=0 |
""");

Expand Down Expand Up @@ -3553,8 +3558,8 @@ static void oldTests() //

static void newTests() // Tests being worked on
{//oldTests();
//test_verilog_delete();
//test_verilog_find();
test_verilog_delete();
test_verilog_find();
test_verilog_put();
//test_delete_ascending();
}
Expand Down
5 changes: 5 additions & 0 deletions StuckPA.java
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,11 @@ P.new I() // U
(Target.T.at(Target.size).getInt() +
Source.T.at(Source.size).getInt());
}
String v()
{return Target.T.at(Target.size).verilogLoad() + " <= " +
Target.T.at(Target.size).verilogLoad() + " + " +
Source.T.at(Source.size).verilogLoad() + ";";
}
};
Target.setSize();
}
Expand Down
Loading

0 comments on commit 68a3f66

Please sign in to comment.