From 1bce4dea1f3c14ddeaeeaa7e34807aca726d1976 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 2 Dec 2022 11:42:07 -0500 Subject: [PATCH] Guard CUDA instantiations --- source/base/kokkos.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/base/kokkos.cc b/source/base/kokkos.cc index 38e78d6cf1..93ccad321b 100644 --- a/source/base/kokkos.cc +++ b/source/base/kokkos.cc @@ -33,10 +33,12 @@ namespace Impl LinearAlgebra::distributed::Vector>{}; GrowingVectorMemory< LinearAlgebra::distributed::Vector>{}; +#ifdef DEAL_II_WITH_CUDA GrowingVectorMemory< - LinearAlgebra::distributed::Vector>{}; + LinearAlgebra::distributed::Vector>{}; GrowingVectorMemory< - LinearAlgebra::distributed::Vector>{}; + LinearAlgebra::distributed::Vector>{}; +#endif Kokkos::push_finalize_hook( GrowingVectorMemory< LinearAlgebra::distributed::Vector>:: @@ -45,14 +47,16 @@ namespace Impl GrowingVectorMemory< LinearAlgebra::distributed::Vector>:: release_unused_memory); +#ifdef DEAL_II_WITH_CUDA Kokkos::push_finalize_hook( GrowingVectorMemory< - LinearAlgebra::distributed::Vector>:: + LinearAlgebra::distributed::Vector>:: release_unused_memory); Kokkos::push_finalize_hook( GrowingVectorMemory< - LinearAlgebra::distributed::Vector>:: + LinearAlgebra::distributed::Vector>:: release_unused_memory); +#endif Kokkos::initialize(); std::atexit(Kokkos::finalize); } -- 2.39.5