From d3a28ecd166dbbb46804b1c73de139a0512b0d64 Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Fri, 5 Jun 2015 15:46:35 -0700 Subject: Fixing bug with local stats not being reset on call to update_stats. Added code to remove the trailing newline character from the C++ name de-mangling fix. Also, fixed small bug with previous commit --- src/gpgpu-sim/gpu-sim.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gpgpu-sim/gpu-sim.cc') diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc index 32de005..eafb909 100644 --- a/src/gpgpu-sim/gpu-sim.cc +++ b/src/gpgpu-sim/gpu-sim.cc @@ -520,7 +520,7 @@ kernel_info_t *gpgpu_sim::select_kernel() { for(unsigned n=0; n < m_running_kernels.size(); n++ ) { unsigned idx = (n+m_last_issued_kernel+1)%m_config.max_concurrent_kernel; - if( kernel_more_cta_left(m_running_kernels[idx] ){ + if( kernel_more_cta_left(m_running_kernels[idx]) ){ m_last_issued_kernel=idx; // record this kernel for stat print if it is the first time this kernel is selected for execution unsigned launch_uid = m_running_kernels[idx]->get_uid(); @@ -749,6 +749,10 @@ void gpgpu_sim::update_stats() { gpu_tot_sim_cycle += gpu_sim_cycle; gpu_tot_sim_insn += gpu_sim_insn; gpu_tot_issued_cta += m_total_cta_launched; + + gpu_sim_cycle = 0; + gpu_sim_insn = 0; + m_total_cta_launched = 0; } void gpgpu_sim::print_stats() -- cgit v1.3