Lines Matching refs:hole_index
50 static inline void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e…
51 static inline void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event*…
122 void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_up_() argument
124 unsigned parent = (hole_index - 1) / 2; in min_heap_shift_up_()
125 while(hole_index && min_heap_elem_greater(s->p[parent], e)) in min_heap_shift_up_()
127 (s->p[hole_index] = s->p[parent])->min_heap_idx = hole_index; in min_heap_shift_up_()
128 hole_index = parent; in min_heap_shift_up_()
129 parent = (hole_index - 1) / 2; in min_heap_shift_up_()
131 (s->p[hole_index] = e)->min_heap_idx = hole_index; in min_heap_shift_up_()
134 void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_down_() argument
136 unsigned min_child = 2 * (hole_index + 1); in min_heap_shift_down_()
142 (s->p[hole_index] = s->p[min_child])->min_heap_idx = hole_index; in min_heap_shift_down_()
143 hole_index = min_child; in min_heap_shift_down_()
144 min_child = 2 * (hole_index + 1); in min_heap_shift_down_()
146 min_heap_shift_up_(s, hole_index, e); in min_heap_shift_down_()