diff options
| author | Ahmed El-Shafiey <[email protected]> | 2013-04-14 21:38:52 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:46 -0700 |
| commit | 45b0064ac97419d66e8c9583fff9d436f0bb9d82 (patch) | |
| tree | 85a619ba395044284ac856253c56055d5b211d96 | |
| parent | 5019d4273ed10a1e51437f93c0bd82c98dd0d956 (diff) | |
define the cudaFuncSetCacheConfig for CUDART_VERSION >= 3000
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15818]
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 7cb4ec4..ef30748 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -787,12 +787,6 @@ __host__ cudaError_t CUDARTAPI cudaGetDevice(int *device) return g_last_cudaError = cudaSuccess; } -__host__ cudaError_t CUDARTAPI cudaFuncSetCacheConfig(const char *func, enum cudaFuncCache cacheConfig ) -{ - CUctx_st *context = GPGPUSim_Context(); - context->get_device()->get_gpgpu()->set_cache_config(context->get_kernel(func)->get_name(), (FuncCache)cacheConfig); - return g_last_cudaError = cudaSuccess; -} /******************************************************************************* * * @@ -1967,6 +1961,15 @@ cudaError_t CUDARTAPI cudaRuntimeGetVersion(int *runtimeVersion) return g_last_cudaError = cudaErrorUnknown; } +#if CUDART_VERSION >= 3000 +__host__ cudaError_t CUDARTAPI cudaFuncSetCacheConfig(const char *func, enum cudaFuncCache cacheConfig ) +{ + CUctx_st *context = GPGPUSim_Context(); + context->get_device()->get_gpgpu()->set_cache_config(context->get_kernel(func)->get_name(), (FuncCache)cacheConfig); + return g_last_cudaError = cudaSuccess; +} +#endif + #endif cudaError_t CUDARTAPI cudaGLSetGLDevice(int device) |
