1 #include "adio.h"
2
3 typedef struct {
4 ADIO_Offset offset;
5 int proc;
6 ADIO_Offset reg_max_len;
7 } heap_node_t;
8
9 typedef struct {
10 heap_node_t *nodes;
11 int size;
12 } heap_t;
13
14 /*static inline int parent(heap_t *heap, int i);
15 static inline int left(heap_t *heap, int i);
16 static inline int right(heap_t *heap, int i); */
17 void ADIOI_Heap_free(heap_t *heap);
18 int ADIOI_Heap_create(heap_t *heap, int size);
19 void ADIOI_Heap_insert(heap_t *heap, ADIO_Offset offset, int proc,
20 ADIO_Offset reg_max_len);
21 void ADIOI_Heap_extract_min(heap_t *heap, ADIO_Offset* key, int *proc,
22 ADIO_Offset *reg_max_len);