proxmark3/common/bucketsort.h

25 lines
586 B
C
Raw Normal View History

#ifndef BUCKETSORT_H__
#define BUCKETSORT_H__
#include <stdint.h>
#include <stdlib.h>
typedef struct bucket {
2019-03-10 02:19:50 +08:00
uint32_t *head;
uint32_t *bp;
} bucket_t;
typedef bucket_t bucket_array_t[2][0x100];
typedef struct bucket_info {
2019-03-10 02:19:50 +08:00
struct {
uint32_t *head, *tail;
2019-03-10 07:00:59 +08:00
} bucket_info[2][0x100];
uint32_t numbuckets;
} bucket_info_t;
2019-03-10 07:00:59 +08:00
void bucket_sort_intersect(uint32_t *const estart, uint32_t *const estop,
uint32_t *const ostart, uint32_t *const ostop,
bucket_info_t *bucket_info, bucket_array_t bucket);
2019-03-12 07:12:26 +08:00
#endif