00001 #include "adio.h" 00002 00003 typedef struct { 00004 ADIO_Offset offset; 00005 int proc; 00006 ADIO_Offset reg_max_len; 00007 } heap_node_t; 00008 00009 typedef struct { 00010 heap_node_t *nodes; 00011 int size; 00012 } heap_t; 00013 00014 /*static inline int parent(heap_t *heap, int i); 00015 static inline int left(heap_t *heap, int i); 00016 static inline int right(heap_t *heap, int i); */ 00017 void ADIOI_Heap_free(heap_t *heap); 00018 int ADIOI_Heap_create(heap_t *heap, int size); 00019 void ADIOI_Heap_insert(heap_t *heap, ADIO_Offset offset, int proc, 00020 ADIO_Offset reg_max_len); 00021 void ADIOI_Heap_extract_min(heap_t *heap, ADIO_Offset* key, int *proc, 00022 ADIO_Offset *reg_max_len);