summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_runtime_api.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 5dfd3fc..3574fc1 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1942,6 +1942,7 @@ __host__ cudaError_t CUDARTAPI cudaBindTextureInternal(
size_t *offset, const struct textureReference *texref, const void *devPtr,
const struct cudaChannelFormatDesc *desc, size_t size __dv(UINT_MAX),
gpgpu_context *gpgpu_ctx = NULL) {
+#if (CUDART_VERSION <= 1200)
gpgpu_context *ctx;
if (gpgpu_ctx) {
ctx = gpgpu_ctx;
@@ -1978,12 +1979,14 @@ __host__ cudaError_t CUDARTAPI cudaBindTextureInternal(
gpu->gpgpu_ptx_sim_bindTextureToArray(texref, array);
devPtr = (void *)(long long)array->devPtr32;
printf("GPGPU-Sim PTX: devPtr = %p\n", devPtr);
+#endif
return g_last_cudaError = cudaSuccess;
}
__host__ cudaError_t CUDARTAPI cudaBindTextureToArrayInternal(
const struct textureReference *texref, const struct cudaArray *array,
const struct cudaChannelFormatDesc *desc, gpgpu_context *gpgpu_ctx = NULL) {
+#if (CUDART_VERSION <= 1200)
gpgpu_context *ctx;
if (gpgpu_ctx) {
ctx = gpgpu_ctx;
@@ -2001,11 +2004,13 @@ __host__ cudaError_t CUDARTAPI cudaBindTextureToArrayInternal(
gpu->gpgpu_ptx_sim_findNamefromTexture(texref));
printf("GPGPU-Sim PTX: Texture Normalized? = %d\n", texref->normalized);
gpu->gpgpu_ptx_sim_bindTextureToArray(texref, array);
+#endif
return g_last_cudaError = cudaSuccess;
}
__host__ cudaError_t CUDARTAPI cudaUnbindTextureInternal(
const struct textureReference *texref, gpgpu_context *gpgpu_ctx = NULL) {
+#if (CUDART_VERSION <= 1200)
gpgpu_context *ctx;
if (gpgpu_ctx) {
ctx = gpgpu_ctx;
@@ -2025,6 +2030,7 @@ __host__ cudaError_t CUDARTAPI cudaUnbindTextureInternal(
gpu->gpgpu_ptx_sim_findNamefromTexture(texref));
gpu->gpgpu_ptx_sim_unbindTexture(texref);
+#endif
return g_last_cudaError = cudaSuccess;
}