Lines Matching refs:base
13 HeapNode *base; member
32 #define Value(h, loc) ((h)->base[loc].value)
33 #define Id(h, loc) ((h)->base[loc].id)
40 h->base[loc].id = Id(h, loc2); in Swap()
41 h->base[loc].value = Value(h, loc2); in Swap()
42 h->base[loc2].id = id; in Swap()
43 h->base[loc2].value = val; in Swap()
72 PetscCall(PetscCalloc1(h->alloc, &h->base)); in PetscHeapCreate()
73 h->base[0].id = -1; in PetscHeapCreate()
74 h->base[0].value = PETSC_INT_MIN; in PetscHeapCreate()
87 h->base[loc].id = id; in PetscHeapAdd()
88 h->base[loc].value = val; in PetscHeapAdd()
104 *id = h->base[0].id; in PetscHeapPop()
105 *val = h->base[0].value; in PetscHeapPop()
109 *id = h->base[1].id; in PetscHeapPop()
110 *val = h->base[1].value; in PetscHeapPop()
115 h->base[1].id = Id(h, loc); in PetscHeapPop()
116 h->base[1].value = Value(h, loc); in PetscHeapPop()
131 *id = h->base[0].id; in PetscHeapPeek()
132 *val = h->base[0].value; in PetscHeapPeek()
136 *id = h->base[1].id; in PetscHeapPeek()
137 *val = h->base[1].value; in PetscHeapPeek()
147 h->base[loc].id = id; in PetscHeapStash()
148 h->base[loc].value = val; in PetscHeapStash()
166 PetscCall(PetscFree((*heap)->base)); in PetscHeapDestroy()
182 PetscCall(PetscIntView(2 * (h->end - 1), (const PetscInt *)(h->base + 1), viewer)); in PetscHeapView()
184 …PetscCall(PetscIntView(2 * (h->alloc - h->stash), (const PetscInt *)(h->base + h->stash), viewer)); in PetscHeapView()