Lines Matching refs:heap
33 struct min_heap *heap, in pop_verify_heap() argument
36 int *values = heap->data; in pop_verify_heap()
41 min_heap_pop(heap, funcs); in pop_verify_heap()
42 while (heap->nr > 0) { in pop_verify_heap()
57 min_heap_pop(heap, funcs); in pop_verify_heap()
66 struct min_heap heap = { in test_heapify_all() local
79 min_heapify_all(&heap, &funcs); in test_heapify_all()
80 err = pop_verify_heap(min_heap, &heap, &funcs); in test_heapify_all()
84 heap.nr = ARRAY_SIZE(values); in test_heapify_all()
85 for (i = 0; i < heap.nr; i++) in test_heapify_all()
88 min_heapify_all(&heap, &funcs); in test_heapify_all()
89 err += pop_verify_heap(min_heap, &heap, &funcs); in test_heapify_all()
99 struct min_heap heap = { in test_heap_push() local
113 min_heap_push(&heap, &data[i], &funcs); in test_heap_push()
115 err = pop_verify_heap(min_heap, &heap, &funcs); in test_heap_push()
118 while (heap.nr < heap.size) { in test_heap_push()
120 min_heap_push(&heap, &temp, &funcs); in test_heap_push()
122 err += pop_verify_heap(min_heap, &heap, &funcs); in test_heap_push()
132 struct min_heap heap = { in test_heap_pop_push() local
147 min_heap_push(&heap, &temp, &funcs); in test_heap_pop_push()
151 min_heap_pop_push(&heap, &data[i], &funcs); in test_heap_pop_push()
153 err = pop_verify_heap(min_heap, &heap, &funcs); in test_heap_pop_push()
155 heap.nr = 0; in test_heap_pop_push()
157 min_heap_push(&heap, &temp, &funcs); in test_heap_pop_push()
162 min_heap_pop_push(&heap, &temp, &funcs); in test_heap_pop_push()
164 err += pop_verify_heap(min_heap, &heap, &funcs); in test_heap_pop_push()