Home | History | Annotate | Download | only in src

Lines Matching defs:child_index

4391       int child_index = 2 * parent_index + 1;
4392 uint32_t child_hash = GetKey(child_index)->Hash();
4393 if (child_index + 1 < len) {
4394 uint32_t right_child_hash = GetKey(child_index + 1)->Hash();
4396 child_index++;
4401 Swap(parent_index, child_index);
4402 // Now element at child_index could be < its children.
4403 parent_index = child_index; // parent_hash remains correct.
4416 int child_index = parent_index * 2 + 1;
4417 uint32_t child_hash = GetKey(child_index)->Hash();
4418 if (child_index + 1 < i) {
4419 uint32_t right_child_hash = GetKey(child_index + 1)->Hash();
4421 child_index++;
4426 Swap(parent_index, child_index);
4427 parent_index = child_index;
8253 int child_index = i;
8254 while (child_index > 0) {
8255 int parent_index = ((child_index + 1) >> 1) - 1;
8257 uint32_t child_value = NumberToUint32(numbers->get(child_index));
8259 content->SwapPairs(numbers, parent_index, child_index);
8263 child_index = parent_index;
8274 int child_index = ((parent_index + 1) << 1) - 1;
8275 if (child_index >= i) break;
8276 uint32_t child1_value = NumberToUint32(numbers->get(child_index));
8277 uint32_t child2_value = NumberToUint32(numbers->get(child_index + 1));
8279 if (child_index + 1 >= i || child1_value > child2_value) {
8281 content->SwapPairs(numbers, parent_index, child_index);
8282 parent_index = child_index;
8285 content->SwapPairs(numbers, parent_index, child_index + 1);
8286 parent_index = child_index + 1;