aboutsummaryrefslogtreecommitdiff
path: root/C/BwtSort.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--C/BwtSort.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/C/BwtSort.c b/C/BwtSort.c
index 3eb57ef..05ad6de 100644
--- a/C/BwtSort.c
+++ b/C/BwtSort.c
@@ -1,5 +1,5 @@
1/* BwtSort.c -- BWT block sorting 1/* BwtSort.c -- BWT block sorting
22021-04-01 : Igor Pavlov : Public domain */ 22023-04-02 : Igor Pavlov : Public domain */
3 3
4#include "Precomp.h" 4#include "Precomp.h"
5 5
@@ -8,8 +8,6 @@
8 8
9/* #define BLOCK_SORT_USE_HEAP_SORT */ 9/* #define BLOCK_SORT_USE_HEAP_SORT */
10 10
11#define NO_INLINE MY_FAST_CALL
12
13/* Don't change it !!! */ 11/* Don't change it !!! */
14#define kNumHashBytes 2 12#define kNumHashBytes 2
15#define kNumHashValues (1 << (kNumHashBytes * 8)) 13#define kNumHashValues (1 << (kNumHashBytes * 8))
@@ -60,7 +58,10 @@ SortGroup - is recursive Range-Sort function with HeapSort optimization for smal
60returns: 1 - if there are groups, 0 - no more groups 58returns: 1 - if there are groups, 0 - no more groups
61*/ 59*/
62 60
63static UInt32 NO_INLINE SortGroup(UInt32 BlockSize, UInt32 NumSortedBytes, UInt32 groupOffset, UInt32 groupSize, int NumRefBits, UInt32 *Indices 61static
62UInt32
63Z7_FASTCALL
64SortGroup(UInt32 BlockSize, UInt32 NumSortedBytes, UInt32 groupOffset, UInt32 groupSize, int NumRefBits, UInt32 *Indices
64 #ifndef BLOCK_SORT_USE_HEAP_SORT 65 #ifndef BLOCK_SORT_USE_HEAP_SORT
65 , UInt32 left, UInt32 range 66 , UInt32 left, UInt32 range
66 #endif 67 #endif
@@ -72,7 +73,7 @@ static UInt32 NO_INLINE SortGroup(UInt32 BlockSize, UInt32 NumSortedBytes, UInt3
72 { 73 {
73 /* 74 /*
74 #ifndef BLOCK_SORT_EXTERNAL_FLAGS 75 #ifndef BLOCK_SORT_EXTERNAL_FLAGS
75 SetFinishedGroupSize(ind2, 1); 76 SetFinishedGroupSize(ind2, 1)
76 #endif 77 #endif
77 */ 78 */
78 return 0; 79 return 0;
@@ -463,7 +464,7 @@ UInt32 BlockSort(UInt32 *Indices, const Byte *data, UInt32 blockSize)
463 Indices[(size_t)(i - finishedGroupSize) + 1] &= kIndexMask; 464 Indices[(size_t)(i - finishedGroupSize) + 1] &= kIndexMask;
464 { 465 {
465 UInt32 newGroupSize = groupSize + finishedGroupSize; 466 UInt32 newGroupSize = groupSize + finishedGroupSize;
466 SetFinishedGroupSize(Indices + i - finishedGroupSize, newGroupSize); 467 SetFinishedGroupSize(Indices + i - finishedGroupSize, newGroupSize)
467 finishedGroupSize = newGroupSize; 468 finishedGroupSize = newGroupSize;
468 } 469 }
469 i += groupSize; 470 i += groupSize;