summaryrefslogtreecommitdiff
path: root/libcuda/cuda_runtime_api.cc
diff options
context:
space:
mode:
authorAndrew M. B. Boktor <[email protected]>2012-08-11 09:44:19 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:48:53 -0700
commit5009c035ab4b201e46af58feb4a231483a0c948e (patch)
tree2cb8fc9422fd1c887d61b50de176f3f9c583c487 /libcuda/cuda_runtime_api.cc
parentbe40c844e8a92ebe8ff3569451a7649712563052 (diff)
Fixing the build for CL 13728 for older gcc
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13730]
Diffstat (limited to 'libcuda/cuda_runtime_api.cc')
-rw-r--r--libcuda/cuda_runtime_api.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 2b04aac..c08bb0a 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1491,9 +1491,8 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin )
CUctx_st *context = GPGPUSim_Context();
static unsigned next_fat_bin_handle = 1;
if(context->get_device()->get_gpgpu()->get_config().use_cuobjdump()) {
- void * s1 = *((void**)(fatCubin+8));
- void * s2 = (s1+72);
- char * filename = (char *)s2;
+ char * s1 = *((char**)((char*)fatCubin+8));
+ char * filename = (s1+72);
unsigned fat_cubin_handle = next_fat_bin_handle;
next_fat_bin_handle++;
printf("GPGPU-Sim PTX: __cudaRegisterFatBinary, fat_cubin_handle = %u, filename=%s\n", fat_cubin_handle, filename);