summaryrefslogtreecommitdiff
path: root/src/gpgpusim_entrypoint.h
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2019-08-30 18:46:42 -0400
committerMahmoud <[email protected]>2019-08-30 18:46:42 -0400
commit41da287aced4587c6005725ac4ca9b9809c2e08f (patch)
tree46cf9ec7739635fbb32098e1f77682ffa46b0da2 /src/gpgpusim_entrypoint.h
parentb829a1c498a992f17b4ba7f00c898cfb6deeca03 (diff)
parent7d1a848b4807aa1f8ed2bb0478f0a53bf09dcee7 (diff)
Merge branch 'dev-private' into dev-purdue-integration-trace
Diffstat (limited to 'src/gpgpusim_entrypoint.h')
-rw-r--r--src/gpgpusim_entrypoint.h51
1 files changed, 47 insertions, 4 deletions
diff --git a/src/gpgpusim_entrypoint.h b/src/gpgpusim_entrypoint.h
index bf03f03..887b3c8 100644
--- a/src/gpgpusim_entrypoint.h
+++ b/src/gpgpusim_entrypoint.h
@@ -29,16 +29,59 @@
#define GPGPUSIM_ENTRYPOINT_H_INCLUDED
#include "abstract_hardware_model.h"
-
+#include <pthread.h>
+#include <semaphore.h>
#include <time.h>
-extern time_t g_simulation_starttime;
+//extern time_t g_simulation_starttime;
+class gpgpu_context;
+
+class GPGPUsim_ctx {
+ public:
+ GPGPUsim_ctx(gpgpu_context* ctx) {
+ g_sim_active = false;
+ g_sim_done = true;
+ break_limit = false;
+ g_sim_lock = PTHREAD_MUTEX_INITIALIZER;
+
+ g_the_gpu_config=NULL;
+ g_the_gpu=NULL;
+ g_stream_manager=NULL;
+ the_cude_device=NULL;
+ the_context=NULL;
+ gpgpu_ctx = ctx;
+ }
+
+ //struct gpgpu_ptx_sim_arg *grid_params;
+
+ sem_t g_sim_signal_start;
+ sem_t g_sim_signal_finish;
+ sem_t g_sim_signal_exit;
+ time_t g_simulation_starttime;
+ pthread_t g_simulation_thread;
+ class gpgpu_sim_config *g_the_gpu_config;
+ class gpgpu_sim *g_the_gpu;
+ class stream_manager *g_stream_manager;
+
+ struct _cuda_device_id *the_cude_device;
+ struct CUctx_st* the_context;
+ gpgpu_context* gpgpu_ctx;
+
+
+ pthread_mutex_t g_sim_lock;
+ bool g_sim_active;
+ bool g_sim_done;
+ bool break_limit;
+
+};
-class gpgpu_sim *gpgpu_ptx_sim_init_perf();
void start_sim_thread(int api);
+class gpgpu_sim* g_the_gpu();
+struct GPGPUsim_ctx* GPGPUsim_ctx_ptr();
+class stream_manager* g_stream_manager();
+
int gpgpu_opencl_ptx_sim_main_perf( kernel_info_t *grid );
-int gpgpu_opencl_ptx_sim_main_func( kernel_info_t *grid );
#endif