]> git.zerfleddert.de Git - proxmark3-svn/blob - common/bucketsort.h
CHG: Extracted @piwi's bucketsort into separate files under /common
[proxmark3-svn] / common / bucketsort.h
1 #ifndef BUCKETSORT_H__
2 #define BUCKETSORT_H__
3 #include <stdint.h>
4 #include <stdbool.h>
5 #include <stdlib.h>
6 typedef struct bucket {
7 uint32_t *head;
8 uint32_t *bp;
9 } bucket_t;
10
11 typedef bucket_t bucket_array_t[2][0x100];
12
13 typedef struct bucket_info {
14 struct {
15 uint32_t *head, *tail;
16 } bucket_info[2][0x100];
17 uint32_t numbuckets;
18 } bucket_info_t;
19
20
21 bool bucket_malloc(bucket_array_t bucket);
22 void bucket_free(bucket_array_t bucket);
23 void bucket_sort_intersect(uint32_t* const estart, uint32_t* const estop,
24 uint32_t* const ostart, uint32_t* const ostop,
25 bucket_info_t *bucket_info, bucket_array_t bucket);
26 #endif
Impressum, Datenschutz