]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compiling with CUDA 8431/head
authorDaniel Arndt <arndtd@ornl.gov>
Mon, 29 Jul 2019 22:12:48 +0000 (22:12 +0000)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 29 Jul 2019 22:14:04 +0000 (22:14 +0000)
cmake/checks/check_01_cpu_features.cmake
include/deal.II/base/config.h.in

index b36f8e7cc028295ef0b424df8a8f46515e1de2bc..6ed6d6b64cfb4bc8c45158e2dd743173eaacd0a2 100644 (file)
@@ -290,6 +290,15 @@ IF(DEAL_II_HAVE_ALTIVEC)
   SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 1)
 ENDIF()
 
+#
+# We need to disable SIMD vectorization for CUDA device code.
+# Otherwise, nvcc compilers from version 9 on will emit an error message like:
+# "[...] contains a vector, which is not supported in device code"
+#
+
+IF(DEAL_II_WITH_CUDA)
+  SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 0)
+ENDIF()
 
 #
 # If we have OpenMP SIMD support (i.e. DEAL_II_HAVE_OPENMP_SIMD is true)
index a86966b272fa0ac4a2630e16cb02dbc4586a60d8..18c4f7ecb151351551c917ee34a81ba3bc345065 100644 (file)
  */
 
 #cmakedefine DEAL_II_WORDS_BIGENDIAN
-// We need to disable SIMD vectorization for CUDA device code.
-// Otherwise, nvcc compilers from version 9 on will emit an error message like:
-// "[...] contains a vector, which is not supported in device code"
-#ifdef DEAL_II_WITH_CUDA
-#  define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0
-#else
-#  define DEAL_II_COMPILER_VECTORIZATION_LEVEL @DEAL_II_COMPILER_VECTORIZATION_LEVEL@
-#endif
+#define DEAL_II_COMPILER_VECTORIZATION_LEVEL @DEAL_II_COMPILER_VECTORIZATION_LEVEL@
 #define DEAL_II_OPENMP_SIMD_PRAGMA @DEAL_II_OPENMP_SIMD_PRAGMA@
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.