summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/shader.cc
diff options
context:
space:
mode:
authorAhmed El-Shafiey <[email protected]>2012-12-26 10:05:56 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:49:24 -0700
commit8de7ff65c9b2a1a81d346067ebac15962912e7c3 (patch)
tree1247d18f9535ccd7ddb9a8d5322c3eede80f35c3 /src/gpgpu-sim/shader.cc
parentc51b872f95ffb8fb860cf6ac7933441bb0ad4eac (diff)
cast the duty cycle to float
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14888]
Diffstat (limited to 'src/gpgpu-sim/shader.cc')
-rw-r--r--src/gpgpu-sim/shader.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 10b5c4a..982edeb 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -1010,7 +1010,7 @@ void shader_core_ctx::writeback()
{
unsigned max_committed_thread_instructions=m_config->warp_size * (m_config->pipe_widths[EX_WB]); //from the functional units
- m_stats->m_pipeline_duty_cycle[m_sid]=(m_stats->m_num_sim_insn[m_sid]-m_stats->m_last_num_sim_insn[m_sid])/max_committed_thread_instructions;
+ m_stats->m_pipeline_duty_cycle[m_sid]=((float)(m_stats->m_num_sim_insn[m_sid]-m_stats->m_last_num_sim_insn[m_sid]))/max_committed_thread_instructions;
m_stats->m_last_num_sim_insn[m_sid]=m_stats->m_num_sim_insn[m_sid];
m_stats->m_last_num_sim_winsn[m_sid]=m_stats->m_num_sim_winsn[m_sid];