summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx-stats.h
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-15 13:31:36 -0400
committerMengchi Zhang <[email protected]>2019-07-15 13:31:36 -0400
commit36aaec0a30445533f04aaf6b55c5ef135e20484a (patch)
treeaa47ed8140bc6d7388bd6afeab59b33705744b3b /src/cuda-sim/ptx-stats.h
parentbd170826a00fe1ea1960ff2e23247ed3f980547b (diff)
Move ptx_line_stats_filename and enable_ptx_file_line_stats
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src/cuda-sim/ptx-stats.h')
-rw-r--r--src/cuda-sim/ptx-stats.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/cuda-sim/ptx-stats.h b/src/cuda-sim/ptx-stats.h
index 4fc6599..c75fc58 100644
--- a/src/cuda-sim/ptx-stats.h
+++ b/src/cuda-sim/ptx-stats.h
@@ -29,13 +29,6 @@
#include "../option_parser.h"
-extern bool enable_ptx_file_line_stats;
-
-// set options
-void ptx_file_line_stats_options(option_parser_t opp);
-
-// output stats to a file
-void ptx_file_line_stats_write_file();
#ifdef __cplusplus
// stat collection interface to cuda-sim
@@ -56,3 +49,19 @@ void ptx_file_line_stats_commit_exposed_latency(int sc_id, int exposed_latency);
void ptx_file_line_stats_add_warp_divergence(unsigned pc, unsigned n_way_divergence);
+class gpgpu_context;
+class ptx_stats {
+ public:
+ ptx_stats(gpgpu_context* ctx) {
+ ptx_line_stats_filename = NULL;
+ gpgpu_ctx = ctx;
+ }
+ char * ptx_line_stats_filename;
+ bool enable_ptx_file_line_stats;
+ gpgpu_context* gpgpu_ctx;
+ // set options
+ void ptx_file_line_stats_options(option_parser_t opp);
+
+ // output stats to a file
+ void ptx_file_line_stats_write_file();
+};