#include "bzlib_private.h"
Go to the source code of this file.
Defines | |
#define | BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8]) |
#define | CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) |
#define | CLEARMASK (~(SETMASK)) |
#define | FALLBACK_QSORT_SMALL_THRESH 10 |
#define | FALLBACK_QSORT_STACK_SIZE 100 |
#define | fmin(a, b) ((a) < (b)) ? (a) : (b) |
#define | fpop(lz, hz) |
#define | fpush(lz, hz) |
#define | fswap(zz1, zz2) { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; } |
#define | fvswap(zzp1, zzp2, zzn) |
#define | ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) |
#define | MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT) |
#define | MAIN_QSORT_SMALL_THRESH 20 |
#define | MAIN_QSORT_STACK_SIZE 100 |
#define | mmin(a, b) ((a) < (b)) ? (a) : (b) |
#define | mnextsize(az) (nextHi[az]-nextLo[az]) |
#define | mnextswap(az, bz) |
#define | mpop(lz, hz, dz) |
#define | mpush(lz, hz, dz) |
#define | mswap(zz1, zz2) { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; } |
#define | mvswap(zzp1, zzp2, zzn) |
#define | SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) |
#define | SETMASK (1 << 21) |
#define | UNALIGNED_BH(zz) ((zz) & 0x01f) |
#define | WORD_BH(zz) bhtab[(zz) >> 5] |
Functions | |
void | BZ2_blockSort (EState *s) |
static void | fallbackQSort3 (UInt32 *fmap, UInt32 *eclass, Int32 loSt, Int32 hiSt) |
static __inline__ void | fallbackSimpleSort (UInt32 *fmap, UInt32 *eclass, Int32 lo, Int32 hi) |
static void | fallbackSort (UInt32 *fmap, UInt32 *eclass, UInt32 *bhtab, Int32 nblock, Int32 verb) |
static __inline__ Bool | mainGtU (UInt32 i1, UInt32 i2, UChar *block, UInt16 *quadrant, UInt32 nblock, Int32 *budget) |
static void | mainQSort3 (UInt32 *ptr, UChar *block, UInt16 *quadrant, Int32 nblock, Int32 loSt, Int32 hiSt, Int32 dSt, Int32 *budget) |
static void | mainSimpleSort (UInt32 *ptr, UChar *block, UInt16 *quadrant, Int32 nblock, Int32 lo, Int32 hi, Int32 d, Int32 *budget) |
static void | mainSort (UInt32 *ptr, UChar *block, UInt16 *quadrant, UInt32 *ftab, Int32 nblock, Int32 verb, Int32 *budget) |
static __inline__ UChar | mmed3 (UChar a, UChar b, UChar c) |
Variables | |
static Int32 | incs [14] |
#define BIGFREQ | ( | b | ) | (ftab[((b)+1) << 8] - ftab[(b) << 8]) |
Definition at line 746 of file blocksort.c.
#define CLEAR_BH | ( | zz | ) | bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) |
Definition at line 206 of file blocksort.c.
Definition at line 748 of file blocksort.c.
#define FALLBACK_QSORT_SMALL_THRESH 10 |
Definition at line 88 of file blocksort.c.
#define FALLBACK_QSORT_STACK_SIZE 100 |
Definition at line 89 of file blocksort.c.
#define fmin | ( | a, | |
b | |||
) | ((a) < (b)) ? (a) : (b) |
Definition at line 78 of file blocksort.c.
#define fpop | ( | lz, | |
hz | |||
) |
{ sp--; \ lz = stackLo[sp]; \ hz = stackHi[sp]; }
Definition at line 84 of file blocksort.c.
#define fpush | ( | lz, | |
hz | |||
) |
{ stackLo[sp] = lz; \ stackHi[sp] = hz; \ sp++; }
Definition at line 80 of file blocksort.c.
Definition at line 63 of file blocksort.c.
#define fvswap | ( | zzp1, | |
zzp2, | |||
zzn | |||
) |
{ \ Int32 yyp1 = (zzp1); \ Int32 yyp2 = (zzp2); \ Int32 yyn = (zzn); \ while (yyn > 0) { \ fswap(fmap[yyp1], fmap[yyp2]); \ yyp1++; yyp2++; yyn--; \ } \ }
Definition at line 66 of file blocksort.c.
#define ISSET_BH | ( | zz | ) | (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) |
Definition at line 207 of file blocksort.c.
#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT) |
Definition at line 617 of file blocksort.c.
#define MAIN_QSORT_SMALL_THRESH 20 |
Definition at line 616 of file blocksort.c.
#define MAIN_QSORT_STACK_SIZE 100 |
Definition at line 618 of file blocksort.c.
#define mmin | ( | a, | |
b | |||
) | ((a) < (b)) ? (a) : (b) |
Definition at line 594 of file blocksort.c.
#define mnextsize | ( | az | ) | (nextHi[az]-nextLo[az]) |
Definition at line 607 of file blocksort.c.
#define mnextswap | ( | az, | |
bz | |||
) |
{ Int32 tz; \ tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \ tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \ tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
Definition at line 609 of file blocksort.c.
#define mpop | ( | lz, | |
hz, | |||
dz | |||
) |
{ sp--; \ lz = stackLo[sp]; \ hz = stackHi[sp]; \ dz = stackD [sp]; }
Definition at line 601 of file blocksort.c.
#define mpush | ( | lz, | |
hz, | |||
dz | |||
) |
{ stackLo[sp] = lz; \ stackHi[sp] = hz; \ stackD [sp] = dz; \ sp++; }
Definition at line 596 of file blocksort.c.
Definition at line 567 of file blocksort.c.
#define mvswap | ( | zzp1, | |
zzp2, | |||
zzn | |||
) |
{ \ Int32 yyp1 = (zzp1); \ Int32 yyp2 = (zzp2); \ Int32 yyn = (zzn); \ while (yyn > 0) { \ mswap(ptr[yyp1], ptr[yyp2]); \ yyp1++; yyp2++; yyn--; \ } \ }
Definition at line 570 of file blocksort.c.
#define SET_BH | ( | zz | ) | bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) |
Definition at line 205 of file blocksort.c.
#define SETMASK (1 << 21) |
Definition at line 747 of file blocksort.c.
#define UNALIGNED_BH | ( | zz | ) | ((zz) & 0x01f) |
Definition at line 209 of file blocksort.c.
#define WORD_BH | ( | zz | ) | bhtab[(zz) >> 5] |
Definition at line 208 of file blocksort.c.
void BZ2_blockSort | ( | EState * | s | ) |
Definition at line 1031 of file blocksort.c.
static void fallbackQSort3 | ( | UInt32 * | fmap, |
UInt32 * | eclass, | ||
Int32 | loSt, | ||
Int32 | hiSt | ||
) | [static] |
Definition at line 93 of file blocksort.c.
static __inline__ void fallbackSimpleSort | ( | UInt32 * | fmap, |
UInt32 * | eclass, | ||
Int32 | lo, | ||
Int32 | hi | ||
) | [static] |
Definition at line 32 of file blocksort.c.
static void fallbackSort | ( | UInt32 * | fmap, |
UInt32 * | eclass, | ||
UInt32 * | bhtab, | ||
Int32 | nblock, | ||
Int32 | verb | ||
) | [static] |
Definition at line 212 of file blocksort.c.
static __inline__ Bool mainGtU | ( | UInt32 | i1, |
UInt32 | i2, | ||
UChar * | block, | ||
UInt16 * | quadrant, | ||
UInt32 | nblock, | ||
Int32 * | budget | ||
) | [static] |
Definition at line 347 of file blocksort.c.
static void mainQSort3 | ( | UInt32 * | ptr, |
UChar * | block, | ||
UInt16 * | quadrant, | ||
Int32 | nblock, | ||
Int32 | loSt, | ||
Int32 | hiSt, | ||
Int32 | dSt, | ||
Int32 * | budget | ||
) | [static] |
Definition at line 621 of file blocksort.c.
static void mainSimpleSort | ( | UInt32 * | ptr, |
UChar * | block, | ||
UInt16 * | quadrant, | ||
Int32 | nblock, | ||
Int32 | lo, | ||
Int32 | hi, | ||
Int32 | d, | ||
Int32 * | budget | ||
) | [static] |
Definition at line 485 of file blocksort.c.
static void mainSort | ( | UInt32 * | ptr, |
UChar * | block, | ||
UInt16 * | quadrant, | ||
UInt32 * | ftab, | ||
Int32 | nblock, | ||
Int32 | verb, | ||
Int32 * | budget | ||
) | [static] |
Definition at line 751 of file blocksort.c.
Definition at line 583 of file blocksort.c.
{ 1, 4, 13, 40, 121, 364, 1093, 3280, 9841, 29524, 88573, 265720, 797161, 2391484 }
Definition at line 480 of file blocksort.c.