diff options
| author | Ahmed El-Shafiey <[email protected]> | 2014-08-06 16:57:40 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:59 -0700 |
| commit | fd3c208f3c51c5520dcd7150d8a521a61577a9d5 (patch) | |
| tree | d17d3c9f47c67e1f56c9e567f51fe7f56dd599c3 /src/abstract_hardware_model.cc | |
| parent | 94a6b6c513c0afaf86770d2af0e41c8d7d0da3f5 (diff) | |
Support for named bariers + bar.red + bar.arrive instructions
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 18452]
Diffstat (limited to 'src/abstract_hardware_model.cc')
| -rw-r--r-- | src/abstract_hardware_model.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc index cd4e8d7..84d165c 100644 --- a/src/abstract_hardware_model.cc +++ b/src/abstract_hardware_model.cc @@ -152,6 +152,7 @@ void warp_inst_t::do_atomic(bool forceDo) { do_atomic( m_warp_active_mask,forceDo ); } + void warp_inst_t::do_atomic( const active_mask_t& access_mask,bool forceDo ) { assert( m_isatomic && (!m_empty||forceDo) ); for( unsigned i=0; i < m_config->warp_size; i++ ) @@ -165,6 +166,20 @@ void warp_inst_t::do_atomic( const active_mask_t& access_mask,bool forceDo ) { } } +void warp_inst_t::broadcast_barrier_reduction(const active_mask_t& access_mask) +{ + for( unsigned i=0; i < m_config->warp_size; i++ ) + { + if( access_mask.test(i) ) + { + dram_callback_t &cb = m_per_scalar_thread[i].callback; + if( cb.thread ){ + cb.function(cb.instruction, cb.thread); + } + } + } +} + void warp_inst_t::generate_mem_accesses() { if( empty() || op == MEMORY_BARRIER_OP || m_mem_accesses_created ) |
