diff options
| author | Tim Rogers <[email protected]> | 2013-06-25 13:30:10 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:57 -0700 |
| commit | aa3cb10c91b1d0e5571172fdefa00aa575f26ebe (patch) | |
| tree | cc9491efcf96c563b4c040e955d380e54ce7f4fc /src/cuda-sim/cuda-sim.h | |
| parent | 00818c011da48dba3789b35c3e3809608790a2e5 (diff) | |
Adding the ability to querry the WARPSZ flag from the ptx script.
Also changed some initialization code when cores are created in both the funcational and perfromance simulator
review:3001 lgtm:5
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 16506]
Diffstat (limited to 'src/cuda-sim/cuda-sim.h')
| -rw-r--r-- | src/cuda-sim/cuda-sim.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cuda-sim/cuda-sim.h b/src/cuda-sim/cuda-sim.h index 96953fb..4c26350 100644 --- a/src/cuda-sim/cuda-sim.h +++ b/src/cuda-sim/cuda-sim.h @@ -85,12 +85,13 @@ void set_param_gpgpu_num_shaders(int num_shaders); class functionalCoreSim: public core_t { public: - functionalCoreSim(kernel_info_t * kernel, gpgpu_sim *g, unsigned maxwarpSize){ - this->m_kernel=kernel; - m_gpu=g; - m_maxWarpSize = maxwarpSize; + functionalCoreSim(kernel_info_t * kernel, gpgpu_sim *g, unsigned warp_size) + : core_t( g, kernel, warp_size, kernel->threads_per_cta() ) + { + m_warpAtBarrier = new bool [m_warp_count]; + m_liveThreadCount = new unsigned [m_warp_count]; } - ~functionalCoreSim(){ + virtual ~functionalCoreSim(){ warp_exit(0); delete[] m_liveThreadCount; delete[] m_warpAtBarrier; @@ -110,15 +111,13 @@ private: virtual void checkExecutionStatusAndUpdate(warp_inst_t &inst, unsigned t, unsigned tid) { if(m_thread[tid]==NULL || m_thread[tid]->is_done()){ - m_liveThreadCount[tid/m_maxWarpSize]--; + m_liveThreadCount[tid/m_warp_size]--; } } // lunches the stack and set the threads count void createWarp(unsigned warpId); - unsigned m_maxWarpSize; - unsigned m_warpsCount; //each warp live thread count and barrier indicator unsigned * m_liveThreadCount; bool* m_warpAtBarrier; |
