File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ static void dradix_r( // single-threaded recursive worker
4343 return ;
4444 }
4545
46- uint64_t cumSum = 0 ;
47- for (uint64_t i = 0 ; cumSum < n ; ++ i ) { // cumSum<n better than i<width as may return early
46+ for (uint64_t i = 0 , cumSum = 0 ; cumSum < n ; ++ i ) { // cumSum<n better than i<width as may return early
4847 uint64_t tmp ;
4948 if ((tmp = counts [i ])) { // don't cumulate through 0s, important below to save a wasteful memset to zero
5049 counts [i ] = cumSum ;
@@ -53,7 +52,7 @@ static void dradix_r( // single-threaded recursive worker
5352 } // leaves cumSum==n && 0<i && i<=width
5453
5554 tmp = in ;
56- for (uint64_t i = 0 ; i < n ; ++ i ) { // go forwards not backwards to give cpu pipeline better chance
55+ for (uint64_t i = 0 ; i < n ; ++ i ) { // go forwards not backwards to give cpu pipeline better chance
5756 int thisx = (* (uint64_t * )tmp - minULL ) >> fromBit & mask ;
5857 working [ counts [thisx ]++ ] = * tmp ;
5958 tmp ++ ;
@@ -71,8 +70,7 @@ static void dradix_r( // single-threaded recursive worker
7170 return ;
7271 }
7372
74- cumSum = 0 ;
75- for (int i = 0 ; cumSum < n ; ++ i ) { // again, cumSum<n better than i<width as it can return early
73+ for (uint64_t i = 0 , cumSum = 0 ; cumSum < n ; ++ i ) { // again, cumSum<n better than i<width as it can return early
7674 if (counts [i ] == 0 ) continue ;
7775 uint64_t thisN = counts [i ] - cumSum ; // undo cummulate; i.e. diff
7876 if (thisN <= INSERT_THRESH ) {
You can’t perform that action at this time.
0 commit comments