@@ -426,15 +426,44 @@ int main(int argc, char ** argv) {
426
426
}
427
427
maddr_prev = maddr ;
428
428
}
429
-
430
- for (j = 0 ; j < w_cnt [w ][i ]; j ++ ) {
431
-
432
- if (gs == -1 ) {
433
- other_cnt ++ ;
434
- continue ;
429
+
430
+ if (gs == -1 ) {
431
+
432
+ //check if this was a gather
433
+ if (w == 0 ) {
434
+
435
+ for (k = 0 ; k < NGS ; k ++ ) {
436
+
437
+ //end
438
+ if (gather_iaddrs [k ] == 0 )
439
+ break ;
440
+
441
+ if (gather_iaddrs [k ] == w_iaddrs [w ][i ]) {
442
+ gs = 0 ;
443
+ break ;
444
+ }
445
+ }
446
+
447
+ //check if this was a scatter
448
+ } else {
449
+
450
+ for (k = 0 ; k < NGS ; k ++ ) {
451
+
452
+ //end
453
+ if (scatter_iaddrs [k ] == 0 )
454
+ break ;
455
+
456
+ if (scatter_iaddrs [k ] == w_iaddrs [w ][i ]) {
457
+ gs = 1 ;
458
+ break ;
459
+ }
460
+ }
435
461
}
436
462
}
437
463
464
+ if (gs == -1 )
465
+ other_cnt ++ ;
466
+
438
467
did_record = 0 ;
439
468
if (gs == 0 ) {
440
469
@@ -696,20 +725,20 @@ int main(int argc, char ** argv) {
696
725
if (giaddrs_nosym || siaddrs_nosym ) {
697
726
printf ("\n" );
698
727
printf ("IGNORED NONSYMBOL STATS:\n" );
699
- printf ("gather iaddrs: %16ld\n" , giaddrs_nosym );
700
- printf ("gather indices: %16ld (%5.2f%c of 1st pass gathers)\n" ,
728
+ printf ("gather unique iaddrs: %16ld\n" , giaddrs_nosym );
729
+ printf ("gather total indices: %16ld (%5.2f%c of 1st pass gathers)\n" ,
701
730
gindices_nosym ,
702
731
100.0 * (double )gindices_nosym / (double )(gindices_nosym + gindices_sym ),'%' );
703
- printf ("scatter iaddrs: %16ld\n" , siaddrs_nosym );
704
- printf ("scatter indices: %16ld (%5.2f%c of 1st pass scatters)\n" ,
732
+ printf ("scatter unique iaddrs: %16ld\n" , siaddrs_nosym );
733
+ printf ("scatter total indices: %16ld (%5.2f%c of 1st pass scatters)\n" ,
705
734
sindices_nosym ,
706
735
100.0 * (double )sindices_nosym / (double )(sindices_nosym + sindices_sym ),'%' );
707
736
printf ("\n" );
708
737
printf ("KEPT SYMBOL STATS:\n" );
709
- printf ("gather iaddrs: %16ld\n" , giaddrs_sym );
710
- printf ("gather indices: %16ld\n" , gindices_sym );
711
- printf ("scatter iaddrs: %16ld\n" , siaddrs_sym );
712
- printf ("scatter indices: %16ld\n" , sindices_sym );
738
+ printf ("gather unique iaddrs: %16ld\n" , giaddrs_sym );
739
+ printf ("gather total indices: %16ld\n" , gindices_sym );
740
+ printf ("scatter unique iaddrs: %16ld\n" , siaddrs_sym );
741
+ printf ("scatter total indices: %16ld\n" , sindices_sym );
713
742
}
714
743
#endif
715
744
0 commit comments