From 45b0064ac97419d66e8c9583fff9d436f0bb9d82 Mon Sep 17 00:00:00 2001 From: Ahmed El-Shafiey Date: Sun, 14 Apr 2013 21:38:52 -0800 Subject: define the cudaFuncSetCacheConfig for CUDART_VERSION >= 3000 [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15818] --- libcuda/cuda_runtime_api.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'libcuda/cuda_runtime_api.cc') 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) -- cgit v1.3