diff options
| author | speverel <[email protected]> | 2016-06-02 11:51:32 -0700 |
|---|---|---|
| committer | speverel <[email protected]> | 2016-06-02 11:51:32 -0700 |
| commit | 59238a8f3a323af90f1e41523eeb88c3e21ab7f6 (patch) | |
| tree | 206a9ab7a5ebc82af672a5d5e593c6f9d35ba7d5 /libcuda | |
| parent | 65577fdc18e5d9b1d93054a644029ab20c598440 (diff) | |
| parent | 766d5cf410ac8f3fd2f1f5a1a26a25d48b40d841 (diff) | |
Merge pull request #1 from speverel/dev
Dev
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 910bebd..e2626d2 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -109,6 +109,7 @@ #include <stdarg.h> #include <iostream> #include <string> +#include <regex> #include <sstream> #include <fstream> #ifdef OPENGL_SUPPORT @@ -1816,10 +1817,15 @@ void __cudaRegisterTexture( int ext ) //passes in a newly created textureReference { + std::string devStr (deviceName); + #if (CUDART_VERSION > 4020) + if (devStr.size() > 2 && devStr.data()[0] == ':' && devStr.data()[1] == ':') + devStr = devStr.replace(0, 2, ""); + #endif CUctx_st *context = GPGPUSim_Context(); gpgpu_t *gpu = context->get_device()->get_gpgpu(); printf("GPGPU-Sim PTX: in __cudaRegisterTexture:\n"); - gpu->gpgpu_ptx_sim_bindNameToTexture(deviceName, hostVar, dim, norm, ext); + gpu->gpgpu_ptx_sim_bindNameToTexture(devStr.data(), hostVar, dim, norm, ext); printf("GPGPU-Sim PTX: int dim = %d\n", dim); printf("GPGPU-Sim PTX: int norm = %d\n", norm); printf("GPGPU-Sim PTX: int ext = %d\n", ext); |
