Home | History | Annotate | Download | only in src

Lines Matching refs:child_index

7885       int child_index = 2 * parent_index + 1;
7886 uint32_t child_hash = GetSortedKey(child_index)->Hash();
7887 if (child_index + 1 < len) {
7888 uint32_t right_child_hash = GetSortedKey(child_index + 1)->Hash();
7890 child_index++;
7895 SwapSortedKeys(parent_index, child_index);
7896 // Now element at child_index could be < its children.
7897 parent_index = child_index; // parent_hash remains correct.
7910 int child_index = parent_index * 2 + 1;
7911 uint32_t child_hash = GetSortedKey(child_index)->Hash();
7912 if (child_index + 1 < i) {
7913 uint32_t right_child_hash = GetSortedKey(child_index + 1)->Hash();
7915 child_index++;
7920 SwapSortedKeys(parent_index, child_index);
7921 parent_index = child_index;
12986 int child_index = i;
12987 while (child_index > 0) {
12988 int parent_index = ((child_index + 1) >> 1) - 1;
12990 uint32_t child_value = NumberToUint32(numbers->get(child_index));
12992 content->SwapPairs(numbers, parent_index, child_index);
12996 child_index = parent_index;
13007 int child_index = ((parent_index + 1) << 1) - 1;
13008 if (child_index >= i) break;
13009 uint32_t child1_value = NumberToUint32(numbers->get(child_index));
13010 uint32_t child2_value = NumberToUint32(numbers->get(child_index + 1));
13012 if (child_index + 1 >= i || child1_value > child2_value) {
13014 content->SwapPairs(numbers, parent_index, child_index);
13015 parent_index = child_index;
13018 content->SwapPairs(numbers, parent_index, child_index + 1);
13019 parent_index = child_index + 1;