Fix CUDA architecture dependent issues
[alexxy/gromacs.git] / src / gromacs / mdlib / nbnxn_cuda / nbnxn_cuda_kernel_utils.cuh
index 769a74031b35041888f867f76bb8a17fc5faac16..2b7b4ddcad599acfb16b4396919e3ac9fbf5f648 100644 (file)
 #ifndef NBNXN_CUDA_KERNEL_UTILS_CUH
 #define NBNXN_CUDA_KERNEL_UTILS_CUH
 
+
+#if defined HAVE_CUDA_TEXOBJ_SUPPORT && __CUDA_ARCH__ >= 300
+/* Note: convenience macro, needs to be undef-ed at the end of the file. */
+#define USE_TEXOBJ
+#endif
+
 #define WARP_SIZE_POW2_EXPONENT     (5)
 #define CL_SIZE_POW2_EXPONENT       (3)  /* change this together with GPU_NS_CLUSTER_SIZE !*/
 #define CL_SIZE_SQ                  (CL_SIZE * CL_SIZE)
@@ -622,4 +628,6 @@ void reduce_energy_warp_shfl(float E_lj, float E_el,
 }
 #endif /* __CUDA_ARCH__ */
 
+#undef USE_TEXOBJ
+
 #endif /* NBNXN_CUDA_KERNEL_UTILS_CUH */