R&Y: Added DAY RTA Tapp Card and Additional BKK BEM Stored Value Card AIDs to `aid_de...
[RRG-proxmark3.git] / common / bucketsort.h
blobe4db1977b46310e0822789d6fc010d0fbcb7cafa
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 #ifndef BUCKETSORT_H__
17 #define BUCKETSORT_H__
19 #include "common.h"
21 typedef struct bucket {
22 uint32_t *head;
23 uint32_t *bp;
24 } bucket_t;
26 typedef bucket_t bucket_array_t[2][0x100];
28 typedef struct bucket_info {
29 struct {
30 uint32_t *head, *tail;
31 } bucket_info[2][0x100];
32 uint32_t numbuckets;
33 } bucket_info_t;
35 void bucket_sort_intersect(uint32_t *const estart, uint32_t *const estop,
36 uint32_t *const ostart, uint32_t *const ostop,
37 bucket_info_t *bucket_info, bucket_array_t bucket);
39 #endif