diff options
| author | Mengchi Zhang <[email protected]> | 2019-07-08 12:37:52 -0400 |
|---|---|---|
| committer | Mengchi Zhang <[email protected]> | 2019-07-08 12:37:52 -0400 |
| commit | b3e786e3d8d720217f36a214e9b5be9a19ab9dd2 (patch) | |
| tree | 4606248aae16685a12a1e4943cdb06d2ca9580ed /src/gpgpu-sim/gpu-sim.h | |
| parent | 7e9591a24ffbe645cfaa7a84b33a82edb9fca0bc (diff) | |
Move opcode_latency_int thus pass gpgpu_context into many classes
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src/gpgpu-sim/gpu-sim.h')
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h index e2c913a..7eeb7dd 100644 --- a/src/gpgpu-sim/gpu-sim.h +++ b/src/gpgpu-sim/gpu-sim.h @@ -295,7 +295,10 @@ extern bool g_interactive_debugger_enabled; class gpgpu_sim_config : public power_config, public gpgpu_functional_sim_config { public: - gpgpu_sim_config() { m_valid = false; } + gpgpu_sim_config(gpgpu_context* ctx): m_shader_config(ctx) { + m_valid = false; + gpgpu_ctx = ctx; + } void reg_options(class OptionParser * opp); void init() { @@ -341,6 +344,8 @@ private: void init_clock_domains(void ); + // backward pointer + class gpgpu_context* gpgpu_ctx; bool m_valid; shader_core_config m_shader_config; memory_config m_memory_config; @@ -473,7 +478,7 @@ public: /*! * Returning the configuration of the shader core, used by the functional simulation only so far */ - const struct shader_core_config * getShaderCoreConfig(); + const shader_core_config * getShaderCoreConfig(); //! Get shader core Memory Configuration @@ -537,7 +542,7 @@ private: const gpgpu_sim_config &m_config; const struct cudaDeviceProp *m_cuda_properties; - const struct shader_core_config *m_shader_config; + const shader_core_config *m_shader_config; const struct memory_config *m_memory_config; // stats |
