]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Kokkos+Cuda: enforce expt-relaxed-constexpr 16531/head
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 24 Jan 2024 20:28:59 +0000 (15:28 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Wed, 24 Jan 2024 20:29:25 +0000 (15:29 -0500)
cmake/modules/FindDEAL_II_KOKKOS.cmake

index e39e93ea262d819a12cff307b39848e5d6dbefa2..a750fd820c72742da240579355759315ebe56cf1 100644 (file)
@@ -48,8 +48,10 @@ else()
     # we don't know if CUDA support is enabled in Kokkos
     if(Kokkos_ENABLE_CUDA)
       set(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 0)
-      # Require lambda support to use Kokkos as a backend
-      KOKKOS_CHECK(OPTIONS CUDA_LAMBDA)
+      # Require lambda support and expt-relaxed-constexpr for Cuda
+      # so that we can use std::array and other interfaces with
+      # __host__ constexpr functions in device code
+      KOKKOS_CHECK(OPTIONS CUDA_LAMBDA CUDA_CONSTEXPR)
 
       # Disable a bunch of annoying warnings generated by boost, template code,
       # and in other random places:

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.