diff options
| author | Mahmoud <[email protected]> | 2019-05-31 13:22:29 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2019-05-31 13:22:29 -0400 |
| commit | 5d55ca32e2d81ee2c9187566050c5d399a142373 (patch) | |
| tree | 02d2990704307f79a140f9af62212d9c4d53c976 /libcuda | |
| parent | ed9f0e6b2a99840e9649551825a40a04e236dcd9 (diff) | |
add new params to the global stryct and fixing some bugs
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 4990edf..3d85b62 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -421,7 +421,8 @@ struct _cuda_device_id *GPGPUSim_Init() prop->maxThreadsPerMultiProcessor = the_gpu->threads_per_core(); #endif the_gpu->set_prop(prop); - the_device = new _cuda_device_id(the_gpu); + GPGPUsim_ctx_ptr()->the_cude_device = new _cuda_device_id(the_gpu); + the_device = GPGPUsim_ctx_ptr()->the_cude_device; } start_sim_thread(1); return the_device; @@ -433,7 +434,8 @@ static CUctx_st* GPGPUSim_Context() CUctx_st *the_context = GPGPUsim_ctx_ptr()->the_context; if( the_context == NULL ) { _cuda_device_id *the_gpu = GPGPUSim_Init(); - the_context = new CUctx_st(the_gpu); + GPGPUsim_ctx_ptr()->the_context = new CUctx_st(the_gpu); + the_context = GPGPUsim_ctx_ptr()->the_context; } return the_context; } |
