File: heap-sort.h

package info (click to toggle)
openmpi 2.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 99,912 kB
  • ctags: 55,589
  • sloc: ansic: 525,999; f90: 18,307; makefile: 12,062; sh: 6,583; java: 6,278; asm: 3,515; cpp: 2,227; perl: 2,136; python: 1,350; lex: 734; fortran: 52; tcl: 12
file content (22 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "adio.h"

typedef struct {
    ADIO_Offset offset;
    int proc;
    ADIO_Offset reg_max_len;
} heap_node_t;

typedef struct {
    heap_node_t *nodes;
    int size;
} heap_t;

/*static inline int parent(heap_t *heap, int i);
static inline int left(heap_t *heap, int i);
static inline int right(heap_t *heap, int i); */
void ADIOI_Heap_free(heap_t *heap);
int ADIOI_Heap_create(heap_t *heap, int size);
void ADIOI_Heap_insert(heap_t *heap, ADIO_Offset offset, int proc,
		 ADIO_Offset reg_max_len);
void ADIOI_Heap_extract_min(heap_t *heap, ADIO_Offset* key, int *proc,
		      ADIO_Offset *reg_max_len);