Home | History | Annotate | Download | only in src

Lines Matching refs:child_index

7850       int child_index = 2 * parent_index + 1;
7851 uint32_t child_hash = GetSortedKey(child_index)->Hash();
7852 if (child_index + 1 < len) {
7853 uint32_t right_child_hash = GetSortedKey(child_index + 1)->Hash();
7855 child_index++;
7860 SwapSortedKeys(parent_index, child_index);
7861 // Now element at child_index could be < its children.
7862 parent_index = child_index; // parent_hash remains correct.
7875 int child_index = parent_index * 2 + 1;
7876 uint32_t child_hash = GetSortedKey(child_index)->Hash();
7877 if (child_index + 1 < i) {
7878 uint32_t right_child_hash = GetSortedKey(child_index + 1)->Hash();
7880 child_index++;
7885 SwapSortedKeys(parent_index, child_index);
7886 parent_index = child_index;
13273 int child_index = i;
13274 while (child_index > 0) {
13275 int parent_index = ((child_index + 1) >> 1) - 1;
13277 uint32_t child_value = NumberToUint32(numbers->get(child_index));
13279 content->SwapPairs(numbers, parent_index, child_index);
13283 child_index = parent_index;
13294 int child_index = ((parent_index + 1) << 1) - 1;
13295 if (child_index >= i) break;
13296 uint32_t child1_value = NumberToUint32(numbers->get(child_index));
13297 uint32_t child2_value = NumberToUint32(numbers->get(child_index + 1));
13299 if (child_index + 1 >= i || child1_value > child2_value) {
13301 content->SwapPairs(numbers, parent_index, child_index);
13302 parent_index = child_index;
13305 content->SwapPairs(numbers, parent_index, child_index + 1);
13306 parent_index = child_index + 1;