Lines Matching refs:WidthFactor
63 /// WidthFactor - This controls the number of K/V slots held in the BTree:
65 /// WidthFactor-1 K/V pairs (except the root) and may have at most
66 /// 2*WidthFactor-1 K/V pairs.
67 enum { WidthFactor = 8 };
71 SourceDelta Values[2*WidthFactor-1];
90 bool isFull() const { return NumValuesUsed == 2*WidthFactor-1; }
125 DeltaTreeNode *Children[2*WidthFactor];
293 /// DoSplit - Split the currently full node (which has 2*WidthFactor-1 values)
294 /// into two subtrees each with "WidthFactor-1" values and a pivot value.
299 // Since this node is full, it contains 2*WidthFactor-1 values. We move
300 // the first 'WidthFactor-1' values to the LHS child (which we leave in this
301 // node), propagate one value up, and move the last 'WidthFactor-1' values
307 // If this is an interior node, also move over 'WidthFactor' children
310 memcpy(&New->Children[0], &IN->Children[WidthFactor],
311 WidthFactor*sizeof(IN->Children[0]));
318 // Move over the last 'WidthFactor-1' values from here to NewNode.
319 memcpy(&NewNode->Values[0], &Values[WidthFactor],
320 (WidthFactor-1)*sizeof(Values[0]));
323 NewNode->NumValuesUsed = NumValuesUsed = WidthFactor-1;
331 InsertRes.Split = Values[WidthFactor-1];