diff options
| author | Tor Aamodt <[email protected]> | 2010-08-23 09:39:43 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-08-23 09:39:43 -0800 |
| commit | 5e8eced64a8262b0190c4014e59b93c37ba3af9c (patch) | |
| tree | 45cbf2cc87a2671c86548d645ef982f6b68373b3 /libopencl | |
| parent | 83a96bb39177a0767c6d851f4fe3ff92757652f5 (diff) | |
- add '-keep' option to keep intermediate files (used for OpenCL only right now)
- remove redundant initialization code of options (which confuses new users)
- make bool option variables bool type
- remove some more extern decls
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7247]
Diffstat (limited to 'libopencl')
| -rw-r--r-- | libopencl/nvopencl_wrapper.cc | 7 | ||||
| -rw-r--r-- | libopencl/opencl_runtime_api.cc | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/libopencl/nvopencl_wrapper.cc b/libopencl/nvopencl_wrapper.cc index 6d446a4..73e60bb 100644 --- a/libopencl/nvopencl_wrapper.cc +++ b/libopencl/nvopencl_wrapper.cc @@ -92,6 +92,13 @@ int main(int argc, const char **argv) bool debug=false; + printf("%s: command line = \'",PREAMBLE); + for( int i=0; i < argc; i++ ) { + printf("%s", argv[i]); + if( (i+1) < argc ) printf(" "); + } + printf("'\n"); + if( !strncmp(argv[1],"-d",2) ) { printf("nvopencl_wrapper started\n"); fflush(stdout); diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc index 054d517..a932738 100644 --- a/libopencl/opencl_runtime_api.cc +++ b/libopencl/opencl_runtime_api.cc @@ -500,11 +500,13 @@ void _cl_program::Build(const char *options) printf("GPGPU-Sim OpenCL API: command line was \'%s\'\n", commandline); exit(1); } - // clean up files... - snprintf(commandline,1024,"rm -f %s", cl_fname ); - result = system(commandline); - if( result != 0 ) - printf("GPGPU-Sim OpenCL API: could not remove temporary files generated while generating PTX\n"); + if( !g_keep_intermediate_files ) { + // clean up files... + snprintf(commandline,1024,"rm -f %s", cl_fname ); + result = system(commandline); + if( result != 0 ) + printf("GPGPU-Sim OpenCL API: could not remove temporary files generated while generating PTX\n"); + } } else { snprintf(ptx_fname,1024,"_%u.ptx", source_num); } |
