diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cuda-sim/ptx_parser.cc | 4 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_parser.h | 3 | ||||
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.cc | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc index 9094ec3..09bc15d 100644 --- a/src/cuda-sim/ptx_parser.cc +++ b/src/cuda-sim/ptx_parser.cc @@ -42,8 +42,7 @@ extern FILE *ptx_get_in (yyscan_t yyscanner ); extern int ptx_parse(yyscan_t scanner, ptx_recognizer* recognizer); extern int ptx_lex_destroy(yyscan_t scanner); -static const struct core_config *g_shader_core_config; -void set_ptx_warp_size(const struct core_config * warp_size) +void ptx_recognizer::set_ptx_warp_size(const struct core_config * warp_size) { g_shader_core_config=warp_size; } @@ -154,7 +153,6 @@ symbol_table * gpgpu_context::init_parser( const char *ptx_filename ) return ptx_parser->g_global_symbol_table; } -static int g_entry_point; void ptx_recognizer::start_function( int entry_point ) { diff --git a/src/cuda-sim/ptx_parser.h b/src/cuda-sim/ptx_parser.h index bc9a872..ec300a1 100644 --- a/src/cuda-sim/ptx_parser.h +++ b/src/cuda-sim/ptx_parser.h @@ -105,6 +105,8 @@ class ptx_recognizer { function_info *g_func_info; operand_info g_return_var; bool g_debug_ir_generation; + int g_entry_point; + const struct core_config *g_shader_core_config; // member function list void init_directive_state(); @@ -172,6 +174,7 @@ class ptx_recognizer { void end_inst_group(); bool check_for_duplicates( const char *identifier ); void read_parser_environment_variables(); + void set_ptx_warp_size(const struct core_config * warp_size); }; diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc index c894278..2ff37d1 100644 --- a/src/gpgpu-sim/gpu-sim.cc +++ b/src/gpgpu-sim/gpu-sim.cc @@ -65,6 +65,7 @@ #include "visualizer.h" #include "stats.h" #include "../cuda-sim/cuda_device_runtime.h" +#include "../../libcuda/gpgpu_context.h" #ifdef GPGPUSIM_POWER_MODEL #include "power_interface.h" @@ -697,15 +698,13 @@ void gpgpu_sim::stop_all_running_kernels(){ } } -void set_ptx_warp_size(const struct core_config * warp_size); - gpgpu_sim::gpgpu_sim( const gpgpu_sim_config &config, gpgpu_context* ctx ) : gpgpu_t(config), m_config(config) { gpgpu_ctx = ctx; m_shader_config = &m_config.m_shader_config; m_memory_config = &m_config.m_memory_config; - set_ptx_warp_size(m_shader_config); + ctx->ptx_parser->set_ptx_warp_size(m_shader_config); ptx_file_line_stats_create_exposed_latency_tracker(m_config.num_shader()); #ifdef GPGPUSIM_POWER_MODEL |
