MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / maxchild

Function maxchild

libCacheSim/dataStructure/pqueue.c:119–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118
119static size_t
120maxchild(pqueue_t *q, size_t i)
121{
122 size_t child_node = left(i);
123
124 if (child_node >= q->size)
125 return 0;
126
127 if ((child_node+1) < q->size &&
128 q->cmppri(q->getpri(q->d[child_node]), q->getpri(q->d[child_node+1])))
129 child_node++; /* use right child instead of left */
130
131 return child_node;
132}
133
134
135static void

Callers 2

percolate_downFunction · 0.85
pqueue_dumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected