summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
authorbftf <[email protected]>2019-11-12 19:14:16 -0800
committerbftf <[email protected]>2019-11-12 19:14:16 -0800
commit57d2df04da439b1055590f10cff5f5f50791b9d9 (patch)
tree6afbf62e80a0f0181a2fe126b467c795a03174d3 /libcuda
parent555cce395bb8457a209b26f6f7ff62cc09839fdf (diff)
Updated the ifdef flag which enables/disables the relevant code blocks for cuda 10; while assuring backwards compatibility for older cuda versions
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_api.h4
-rw-r--r--libcuda/cuda_runtime_api.cc10
2 files changed, 7 insertions, 7 deletions
diff --git a/libcuda/cuda_api.h b/libcuda/cuda_api.h
index b304a59..0ded242 100644
--- a/libcuda/cuda_api.h
+++ b/libcuda/cuda_api.h
@@ -234,11 +234,11 @@ typedef struct CUgraphicsResource_st *CUgraphicsResource; /**< CUDA graphics int
typedef unsigned long long CUtexObject; /**< An opaque value that represents a CUDA texture object */
typedef unsigned long long CUsurfObject; /**< An opaque value that represents a CUDA surface object */
-#if CUDA_VERSION < 1000
+#if CUDART_VERSION < 10000
typedef struct CUuuid_st { /**< CUDA definition of UUID */
char bytes[16];
} CUuuid;
-#endif
+#endif // #if CUDART_VERSION < 10000
#if __CUDA_API_VERSION >= 4010
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index fd092e5..71b8722 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1449,7 +1449,7 @@ __host__ cudaError_t CUDARTAPI cudaConfigureCall(dim3 gridDim, dim3 blockDim, si
}
-#if CUDA_VERSION >= 1000
+#if CUDART_VERSION >= 10000
/*
* CUDA 10 requires a new CUDA kernel launch sequence
* A call to __cudaPushCallConfiguration() preceeds any call to cudaLaunchKernel()
@@ -1489,7 +1489,7 @@ __host__ cudaError_t CUDARTAPI __cudaPopCallConfiguration()
return cudaSuccess;
}
-#endif // #if CUDA_VERSION >= 1000
+#endif // #if CUDART_VERSION >= 10000
__host__ cudaError_t CUDARTAPI cudaSetupArgument(const void *arg, size_t size, size_t offset)
@@ -1596,12 +1596,12 @@ __host__ cudaError_t CUDARTAPI cudaLaunchKernel ( const char* hostFun, dim3 grid
CUctx_st *context = GPGPUSim_Context();
function_info *entry = context->get_kernel(hostFun);
-#if CUDA_VERSION >= 1000
+#if CUDART_VERSION >= 10000
assert(g_cudaPushArgsBuffer::g_is_initialized == false);
cudaConfigureCall(g_cudaPushArgsBuffer::g_gridDim, g_cudaPushArgsBuffer::g_blockDim, g_cudaPushArgsBuffer::g_sharedMem, g_cudaPushArgsBuffer::g_stream);
#else
- cudaConfigureCall(gridDim, blockDim, sharedMem, stream);
-#endif // #if CUDA_VERSION >= 1000
+ cudaConfigureCall(gridDim, blockDim, sharedMem, stream);
+#endif // #if CUDART_VERSION >= 10000
for(unsigned i = 0; i < entry->num_args(); i++){
std::pair<size_t, unsigned> p = entry->get_param_config(i);