From 177afa15266ddcc87cc60ecda552717e07197eaa Mon Sep 17 00:00:00 2001 From: Mahmoud Date: Fri, 20 Sep 2019 15:17:56 -0400 Subject: removing some comments and refectoring the code --- src/trace-driven/gpgpusim_trace_driven_main.cc | 41 +++++--------------------- src/trace-driven/trace_driven.h | 16 +++------- 2 files changed, 12 insertions(+), 45 deletions(-) (limited to 'src/trace-driven') diff --git a/src/trace-driven/gpgpusim_trace_driven_main.cc b/src/trace-driven/gpgpusim_trace_driven_main.cc index fea56c1..76c2cda 100644 --- a/src/trace-driven/gpgpusim_trace_driven_main.cc +++ b/src/trace-driven/gpgpusim_trace_driven_main.cc @@ -16,18 +16,10 @@ #include "../cuda-sim/ptx_ir.h" #include "../cuda-sim/ptx_parser.h" #include "../gpgpu-sim/gpu-sim.h" -//#include "../gpgpu-sim/icnt_wrapper.h" -//#include "../gpgpu-sim/icnt_wrapper.h" #include "../../libcuda/gpgpu_context.h" #include "trace_driven.h" #include "trace_opcode.h" #include "../gpgpusim_entrypoint.h" -//#include "gpgpu_context.h" - -//#include "../stream_manager.h" - - -void arguments_check(); int main ( int argc, const char **argv ) @@ -243,8 +235,6 @@ bool trace_kernel_info_t::get_next_threadblock_traces(std::vectorclear(); } - //unsigned warps_per_tb = ceil(float(threads_per_cta()/32)); - //threadblock_traces.resize(warps_per_tb); unsigned block_id_x=0, block_id_y=0, block_id_z=0; unsigned warp_id=0; @@ -273,11 +263,9 @@ bool trace_kernel_info_t::get_next_threadblock_traces(std::vectorreserve(insts_num); - //std::cout << line << std::endl; } else { assert(start_of_tb_stream_found); trace_warp_inst_t inst(m_gpgpu_sim->getShaderCoreConfig(), m_gpgpu_context); - //std::cout<push_back(inst); } @@ -329,16 +314,15 @@ bool trace_warp_inst_t::parse_from_string(std::string trace){ unsigned mem_width=0; unsigned long long mem_addresses[warp_size()]; + //Start Parsing ss>>std::dec>>threadblock_x>>threadblock_y>>threadblock_z>>warpid_tb>>sm_id>>warpid_sm; - ss>>std::hex>>m_pc>>mask; - //std::cout<<"m_pc= "<>opcode; ss>>reg_srcs_num; - for(unsigned i=0; i>temp; sscanf(temp.c_str(), "R%d", ®_srcs[i]); @@ -365,7 +348,7 @@ bool trace_warp_inst_t::parse_from_string(std::string trace){ mem_addresses[s]=0; } } - + //Finish Parsing //After parsing, fill the inst_t and warp_inst_t params //fill active mask @@ -378,7 +361,6 @@ bool trace_warp_inst_t::parse_from_string(std::string trace){ //fill and initialize common params m_decoded = true; pc = (address_type)m_pc; //we will lose the high 32 bits from casting long to unsigned, it should be okay! - //std::cout<<"pc= "< m_trace_warp; + friend class shader_core_ctx; private: - + std::vector m_trace_warp; }; -- cgit v1.3