summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_loader.cc
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-08-23 09:39:43 -0800
committerTor Aamodt <[email protected]>2010-08-23 09:39:43 -0800
commit5e8eced64a8262b0190c4014e59b93c37ba3af9c (patch)
tree45cbf2cc87a2671c86548d645ef982f6b68373b3 /src/cuda-sim/ptx_loader.cc
parent83a96bb39177a0767c6d851f4fe3ff92757652f5 (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 'src/cuda-sim/ptx_loader.cc')
-rw-r--r--src/cuda-sim/ptx_loader.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cuda-sim/ptx_loader.cc b/src/cuda-sim/ptx_loader.cc
index 713bdb3..783ce91 100644
--- a/src/cuda-sim/ptx_loader.cc
+++ b/src/cuda-sim/ptx_loader.cc
@@ -299,13 +299,17 @@ void gpgpu_ptx_sim_add_ptxstring( const char *ptx_string, const char *sourcefnam
}
}
-static int g_save_embedded_ptx = 0;
+static bool g_save_embedded_ptx;
+bool g_keep_intermediate_files;
void ptx_reg_options(option_parser_t opp)
{
option_parser_register(opp, "-save_embedded_ptx", OPT_BOOL, &g_save_embedded_ptx,
"saves ptx files embedded in binary as <n>.ptx",
"0");
+ option_parser_register(opp, "-keep", OPT_BOOL, &g_keep_intermediate_files,
+ "keep intermediate files created by GPGPU-Sim when interfacing with external programs",
+ "0");
}
void print_ptx_file( const char *p, unsigned source_num, const char *filename )