You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rprintf("from:%d to:%d radix:%d\n", from, to, radix);
832
830
if (my_n==1) { // minor TODO: batch up the 1's instead in caller (and that's only needed when retgrp anyway)
833
831
push(&my_n, 1);
834
832
TEND(5);
@@ -851,7 +849,6 @@ void radix_r(const int from, const int to, const int radix) {
851
849
// to use it once. However, o's type is uint8_t so many moves within this max-256 vector should be faster than many moves in osub (4 byte or 8 byte ints) [1 byte
852
850
// type is always aligned]
853
851
boolskip= true;
854
-
//Rprintf("sortType: %d\n", sortType);
855
852
if (sortType!=0) {
856
853
// always ascending as desc (sortType==-1) was dealt with in WRITE_KEY
857
854
intstart=1;
@@ -937,8 +934,6 @@ void radix_r(const int from, const int to, const int radix) {
937
934
elsemy_gs[ngrp]++;
938
935
}
939
936
ngrp++;
940
-
for(inti=0; i<ngrp; i++) Rprintf("my_gs[%d]: %d\n", i, my_gs[i]);
941
-
for(inti=0; i<my_n; i++) Rprintf("my_key[%d]: %d\n", i, my_key[i]);
942
937
TEND(9)
943
938
if (radix+1==nradix||ngrp==my_n) { // ngrp==my_n => unique groups all size 1 and we can stop recursing now
944
939
push(my_gs, ngrp);
@@ -1267,13 +1262,18 @@ void radix_r(const int from, const int to, const int radix) {
// i) detects if grouped; if sortType==0 can then skip
1307
1306
// ii) keeps group appearance order at byte level to minimize movement
@@ -1316,7 +1315,6 @@ void radix_i(int from, int to, int radix) {
1316
1315
// to use it once. However, o's type is uint8_t so many moves within this max-256 vector should be faster than many moves in osub (4 byte or 8 byte ints) [1 byte
1317
1316
// type is always aligned]
1318
1317
boolskip= true;
1319
-
//Rprintf("sortType: %d\n", sortType);
1320
1318
if (sortType!=0) {
1321
1319
// always ascending as desc (sortType==-1) was dealt with in WRITE_KEY
1322
1320
intstart=1;
@@ -1357,7 +1355,6 @@ void radix_i(int from, int to, int radix) {
1357
1355
skip= false;
1358
1356
break;
1359
1357
}
1360
-
//Rprintf("skip: %d\n", skip);
1361
1358
if (!skip) {
1362
1359
// and now it's worth populating o[]
1363
1360
for (inti=0; i<third; i++) o[i] =i;
@@ -1403,8 +1400,6 @@ void radix_i(int from, int to, int radix) {
1403
1400
elsemy_gs[ngrp]++;
1404
1401
}
1405
1402
ngrp++;
1406
-
for(inti=0; i<ngrp; i++) Rprintf("my_gs[%d]: %d\n", i, my_gs[i]);
1407
-
for(inti=0; i<my_n; i++) Rprintf("my_key[%d]: %d\n", i, my_key[i]);
1408
1403
TEND(9)
1409
1404
if (radix+1==nradix||ngrp==my_n) { // ngrp==my_n => unique groups all size 1 and we can stop recursing now
1410
1405
push(my_gs, ngrp);
@@ -1417,7 +1412,6 @@ void radix_i(int from, int to, int radix) {
1417
1412
continue;
1418
1413
}
1419
1414
elseif (my_n<=UINT16_MAX) { // UINT16_MAX==65535 (important not 65536)
1420
-
// if (nth==1) Rprintf(_("counting clause: radix=%d, my_n=%d\n"), radix, my_n);
1421
1415
uint16_tmy_counts[256] = {0}; // Needs to be all-0 on entry. This ={0} initialization should be fast as it's on stack. Otherwise, we have to manage
1422
1416
// a stack of counts anyway since this is called recursively and these counts are needed to make the recursive calls.
1423
1417
// This thread-private stack alloc has no chance of false sharing and gives omp and compiler best chance.
0 commit comments