Lines Matching full:child_index
8113 int child_index = 2 * parent_index + 1;
8114 uint32_t child_hash = GetSortedKey(child_index)->Hash();
8115 if (child_index + 1 < len) {
8116 uint32_t right_child_hash = GetSortedKey(child_index + 1)->Hash();
8118 child_index++;
8123 SwapSortedKeys(parent_index, child_index);
8124 // Now element at child_index could be < its children.
8125 parent_index = child_index; // parent_hash remains correct.
8138 int child_index = parent_index * 2 + 1;
8139 uint32_t child_hash = GetSortedKey(child_index)->Hash();
8140 if (child_index + 1 < i) {
8141 uint32_t right_child_hash = GetSortedKey(child_index + 1)->Hash();
8143 child_index++;
8148 SwapSortedKeys(parent_index, child_index);
8149 parent_index = child_index;
13479 int child_index = i;
13480 while (child_index > 0) {
13481 int parent_index = ((child_index + 1) >> 1) - 1;
13483 uint32_t child_value = NumberToUint32(numbers->get(child_index));
13485 content->SwapPairs(numbers, parent_index, child_index);
13489 child_index = parent_index;
13500 int child_index = ((parent_index + 1) << 1) - 1;
13501 if (child_index >= i) break;
13502 uint32_t child1_value = NumberToUint32(numbers->get(child_index));
13503 uint32_t child2_value = NumberToUint32(numbers->get(child_index + 1));
13505 if (child_index + 1 >= i || child1_value > child2_value) {
13507 content->SwapPairs(numbers, parent_index, child_index);
13508 parent_index = child_index;
13511 content->SwapPairs(numbers, parent_index, child_index + 1);
13512 parent_index = child_index + 1;