From e4125fe310b8c1b7c46ebebbebe65d51fd681992 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Tue, 15 May 2012 09:19:40 -0800 Subject: Removing a couple of warnings [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12564] --- libcuda/cuda_runtime_api.cc | 3 --- src/cuda-sim/ptx_loader.cc | 4 ---- src/gpgpu-sim/shader.cc | 8 ++++---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 9bc7c3a..1f95af6 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -1168,7 +1168,6 @@ void extract_code_using_cuobjdump(){ int fd=mkstemp(fname); close(fd); - char* whole_code; //! Running cuobjdump using dynamic link to current process snprintf(command,1000,"$CUDA_INSTALL_PATH/bin/cuobjdump -ptx -elf -sass /proc/%d/exe > %s",getpid(),fname); printf("Running cuobjdump using \"%s\"\n", command); @@ -1186,7 +1185,6 @@ void extract_code_using_cuobjdump(){ //! Read file into char* char* readfile (const char* filename){ assert (filename != NULL); - char str[128]; FILE* fp = fopen(filename,"r"); if (!fp) { printf("ERROR: Could not open file %s for reading\n", filename); @@ -1288,7 +1286,6 @@ void useCuobjdump() { CUctx_st *context = GPGPUSim_Context(); unsigned source_num=1; - char *sass, *elf; extract_code_using_cuobjdump(); //extract all the output of cuobjdump to _cuobjdump_*.* cuobjdumpSectionList = pruneSectionList(cuobjdumpSectionList, context); unsigned total_ptx_files = cuobjdumpSectionList.size()/2; diff --git a/src/cuda-sim/ptx_loader.cc b/src/cuda-sim/ptx_loader.cc index d405288..690d6ee 100644 --- a/src/cuda-sim/ptx_loader.cc +++ b/src/cuda-sim/ptx_loader.cc @@ -107,10 +107,6 @@ char* gpgpu_ptx_sim_convert_ptx_and_sass_to_ptxplus(const char *ptxfilename, con int fd4=mkstemp(fname_ptxplus); close(fd4); - // Extract cubin to a file - char fname_decuda[1024]; - char fname_cubin[1024]; - // Run cuobjdump_to_ptxplus char commandline[1024]; int result; diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 4ddac46..6893dda 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -214,7 +214,7 @@ shader_core_ctx::shader_core_ctx( class gpgpu_sim *gpu, //there are as many result buses as the width of the EX_WB stage num_result_bus = config->pipe_widths[EX_WB]; - for(int i=0; im_result_bus.push_back(new std::bitset()); } @@ -702,7 +702,7 @@ unsigned shader_core_ctx::translate_local_memaddr( address_type localaddr, unsig ///////////////////////////////////////////////////////////////////////////////////////// int shader_core_ctx::test_res_bus(int latency){ - for(int i=0; itest(latency)){return i;} } return -1; @@ -710,7 +710,7 @@ int shader_core_ctx::test_res_bus(int latency){ void shader_core_ctx::execute() { - for(int i=0; i>=1; } for( unsigned n=0; n < m_num_function_units; n++ ) { @@ -1495,7 +1495,7 @@ void shader_core_ctx::display_pipeline(FILE *fout, int print_mem, int mask ) con } fprintf(fout, "-------------------------- other:\n"); - for(int i=0; ito_string(); fprintf(fout, "EX/WB sched[%d]= %s\n", i, bits.c_str() ); } -- cgit v1.3