Lines Matching refs:heap
50 struct pq_heap_st *heap; member
69 assert(pq->elements[pq->heap[idx].index].used); \
70 assert(pq->elements[pq->heap[idx].index].posn == idx)
107 struct pq_heap_st *h = pq->heap, t_h; in pqueue_swap_elem()
123 struct pq_heap_st *h = pq->heap; in pqueue_move_elem()
154 struct pq_heap_st *h = pq->heap; in pqueue_move_down()
174 struct pq_heap_st *h = pq->heap; in pqueue_move_up()
208 pq->heap[n].data = data; in ossl_pqueue_push()
209 pq->heap[n].index = m; in ossl_pqueue_push()
225 return pq->heap->data; in ossl_pqueue_peek()
239 res = pq->heap->data; in ossl_pqueue_pop()
240 elem = pq->heap->index; in ossl_pqueue_pop()
273 return pq->heap[--pq->htop].data; in ossl_pqueue_remove()
313 h = OPENSSL_realloc(pq->heap, new_max * sizeof(*pq->heap)); in ossl_pqueue_reserve()
316 pq->heap = h; in ossl_pqueue_reserve()
342 pq->heap = OPENSSL_malloc(sizeof(*pq->heap) * min_nodes); in ossl_pqueue_new()
344 if (pq->heap == NULL || pq->elements == NULL) { in ossl_pqueue_new()
355 OPENSSL_free(pq->heap); in ossl_pqueue_free()
367 (*freefunc)(pq->heap[i].data); in ossl_pqueue_pop_free()