]> git.zerfleddert.de Git - proxmark3-svn/blame - common/bucketsort.h
CHG: Extracted @piwi's bucketsort into separate files under /common
[proxmark3-svn] / common / bucketsort.h
CommitLineData
089d061f 1#ifndef BUCKETSORT_H__
2#define BUCKETSORT_H__
3#include <stdint.h>
4#include <stdbool.h>
5#include <stdlib.h>
6typedef struct bucket {
7 uint32_t *head;
8 uint32_t *bp;
9} bucket_t;
10
11typedef bucket_t bucket_array_t[2][0x100];
12
13typedef 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
21bool bucket_malloc(bucket_array_t bucket);
22void bucket_free(bucket_array_t bucket);
23void 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