089d061f |
1 | #ifndef BUCKETSORT_H__ |
2 | #define BUCKETSORT_H__ |
3e134b4c |
3 | |
089d061f |
4 | #include <stdint.h> |
089d061f |
5 | #include <stdlib.h> |
3e134b4c |
6 | |
089d061f |
7 | typedef struct bucket { |
8 | uint32_t *head; |
9 | uint32_t *bp; |
10 | } bucket_t; |
11 | |
12 | typedef bucket_t bucket_array_t[2][0x100]; |
13 | |
14 | typedef struct bucket_info { |
15 | struct { |
16 | uint32_t *head, *tail; |
17 | } bucket_info[2][0x100]; |
18 | uint32_t numbuckets; |
19 | } bucket_info_t; |
20 | |
089d061f |
21 | void bucket_sort_intersect(uint32_t* const estart, uint32_t* const estop, |
22 | uint32_t* const ostart, uint32_t* const ostop, |
23 | bucket_info_t *bucket_info, bucket_array_t bucket); |
24 | #endif |