Commit a75c6ae4 authored by Robert Maynard's avatar Robert Maynard
Browse files

Automatically disable assert for CUDA 7.5 as they don't work in device code

parent d3fe1a6b
......@@ -38,7 +38,11 @@
///
/// The VTKM_NO_ASSERT cmake and preprocessor option allows debugging builds
/// to remove assertions for performance reasons.
#if !defined(NDEBUG) && !defined(VTKM_NO_ASSERT)
#if defined(VTKM_CUDA_VERSION_MAJOR) && VTKM_CUDA_VERSION_MAJOR == 7
//CUDA 7.5 doesn't support assert in device code
#define VTKM_ASSERT(condition) (void)(condition)
#elif !defined(NDEBUG) && !defined(VTKM_NO_ASSERT)
//Only assert if we are in debug mode and don't have VTKM_NO_ASSERT defined
#define VTKM_ASSERT(condition) assert(condition)
#else
#define VTKM_ASSERT(condition) (void)(condition)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment