summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2011-10-27 16:39:10 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:18:23 -0700
commitb4dcac15e64b9007930824409ca3ed901da37ef3 (patch)
tree7742ecd2dfd90b61c68658254feab51a3a3598e5 /src
parent332f225a945acd9c884dc0fb7cb993e6865dc415 (diff)
Fixing the atomics I broke with the insn count fix
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 10754]
Diffstat (limited to 'src')
-rw-r--r--src/abstract_hardware_model.h7
-rw-r--r--src/gpgpu-sim/mem_fetch.cc2
-rw-r--r--src/gpgpu-sim/shader.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index d0822d0..a314300 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -654,12 +654,15 @@ public:
}
// modifiers
- void do_atomic()
+ void do_atomic() {
+ do_atomic( m_warp_active_mask );
+ }
+ void do_atomic( const active_mask_t& access_mask )
{
assert( m_isatomic && !m_empty );
for( unsigned i=0; i < m_config->warp_size; i++ )
{
- if( m_warp_active_mask.test(i) )
+ if( access_mask.test(i) )
{
dram_callback_t &cb = m_per_scalar_thread[i].callback;
if( cb.thread )
diff --git a/src/gpgpu-sim/mem_fetch.cc b/src/gpgpu-sim/mem_fetch.cc
index a09c071..abf1d4e 100644
--- a/src/gpgpu-sim/mem_fetch.cc
+++ b/src/gpgpu-sim/mem_fetch.cc
@@ -117,7 +117,7 @@ bool mem_fetch::isatomic() const
void mem_fetch::do_atomic()
{
- m_inst.do_atomic();
+ m_inst.do_atomic( m_access.get_warp_mask() );
}
bool mem_fetch::istexture() const
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index e7d2f1b..5db35d3 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -1110,8 +1110,6 @@ public:
mem_fetch *alloc( const warp_inst_t &inst, const mem_access_t &access ) const
{
warp_inst_t inst_copy = inst;
- // tgrogers Oct 27, 2011 - I am commenting out this line of code, because it is screwing up our instruction counts on memory instructions. I am not sure what the point of this was, because no one seems to read the active mask on the memory fetches's warp instruction.
- //inst_copy.set_active(access.get_warp_mask());
mem_fetch *mf = new mem_fetch(access,
&inst_copy,
access.is_write()?WRITE_PACKET_SIZE:READ_PACKET_SIZE,