]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guard CUDA instantiations
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 2 Dec 2022 16:42:07 +0000 (11:42 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 8 Dec 2022 22:13:15 +0000 (17:13 -0500)
source/base/kokkos.cc

index 38e78d6cf15202a7ad0a9be45dd5636bf387ce24..93ccad321bd39b3e8e9b55738600acfa3853f7f5 100644 (file)
@@ -33,10 +33,12 @@ namespace Impl
           LinearAlgebra::distributed::Vector<double, MemorySpace::Host>>{};
         GrowingVectorMemory<
           LinearAlgebra::distributed::Vector<float, MemorySpace::Host>>{};
+#ifdef DEAL_II_WITH_CUDA
         GrowingVectorMemory<
-          LinearAlgebra::distributed::Vector<double, MemorySpace::Device>>{};
+          LinearAlgebra::distributed::Vector<double, MemorySpace::CUDA>>{};
         GrowingVectorMemory<
-          LinearAlgebra::distributed::Vector<float, MemorySpace::Device>>{};
+          LinearAlgebra::distributed::Vector<float, MemorySpace::CUDA>>{};
+#endif
         Kokkos::push_finalize_hook(
           GrowingVectorMemory<
             LinearAlgebra::distributed::Vector<double, MemorySpace::Host>>::
@@ -45,14 +47,16 @@ namespace Impl
           GrowingVectorMemory<
             LinearAlgebra::distributed::Vector<float, MemorySpace::Host>>::
             release_unused_memory);
+#ifdef DEAL_II_WITH_CUDA
         Kokkos::push_finalize_hook(
           GrowingVectorMemory<
-            LinearAlgebra::distributed::Vector<double, MemorySpace::Device>>::
+            LinearAlgebra::distributed::Vector<double, MemorySpace::CUDA>>::
             release_unused_memory);
         Kokkos::push_finalize_hook(
           GrowingVectorMemory<
-            LinearAlgebra::distributed::Vector<float, MemorySpace::Device>>::
+            LinearAlgebra::distributed::Vector<float, MemorySpace::CUDA>>::
             release_unused_memory);
+#endif
         Kokkos::initialize();
         std::atexit(Kokkos::finalize);
       }

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.