  }else{
   return -1; //invalid GPU number
  }
+ total_flops=0.0; total_traffic_in=0.0; total_traffic_out=0.0;
  for(i=b;i<=f;i++){
   if(gpu_is_mine(i) != GPU_OFF){
    ctm=clock();
    gpu_stats[i].time_active=((double)(ctm-gpu_stats[i].time_start))/CLOCKS_PER_SEC;
+   total_flops+=gpu_stats[i].flops;
+   total_traffic_in+=gpu_stats[i].traffic_in;
+   total_traffic_out+=gpu_stats[i].traffic_out;
    printf("\n#MSG(TAL-SH::NV-TAL): Statistics on GPU #%d:\n",i);
    printf(" Number of tasks submitted: %llu\n",gpu_stats[i].tasks_submitted);
    printf(" Number of tasks completed: %llu\n",gpu_stats[i].tasks_completed);

//  }else{
//   printf("\n#MSG(TAL-SH::NV-TAL): Statistics on GPU #%d: GPU is OFF\n",i);
  }
 }
 return 0;
}

/** Tensor Algebra Library for NVidia GPU: NV-TAL (CUDA based).
AUTHOR: Dmitry I. Lyakh (Liakh): quant4me@gmail.com, liakhdi@ornl.gov
REVISION: 2019/09/11

Copyright (C) 2014-2019 Dmitry I. Lyakh (Liakh)
Copyright (C) 2014-2019 Oak Ridge National Laboratory (UT-Battelle)
