summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-sim.h
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-08 14:19:32 -0400
committerGitHub <[email protected]>2019-07-08 14:19:32 -0400
commit109a03655326ed23d26a3496589b21be51089bbb (patch)
tree3331bc8b8159411d2ebf9203ea99235cba9baa92 /src/gpgpu-sim/gpu-sim.h
parent47d18d2dea9a27061193218f1e70ba50cf7ff46f (diff)
parentb3e786e3d8d720217f36a214e9b5be9a19ab9dd2 (diff)
Merge pull request #22 from echoedit/dev
g_keep_intermediate_files
Diffstat (limited to 'src/gpgpu-sim/gpu-sim.h')
-rw-r--r--src/gpgpu-sim/gpu-sim.h11
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