]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix multiple definitions for CUDAWrappes::internal::used_objects
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 29 Oct 2020 19:29:09 +0000 (15:29 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 29 Oct 2020 19:29:09 +0000 (15:29 -0400)
include/deal.II/matrix_free/cuda_matrix_free.templates.h
source/matrix_free/cuda_matrix_free.cu

index 775808150ff5d63bde5e7dda3a57697f12b3df62..693016f66a99ec01be9b408c5674083d4b503a46 100644 (file)
@@ -52,7 +52,7 @@ namespace CUDAWrappers
       (mf_max_elem_degree + 1) * (mf_max_elem_degree + 1);
 
     // Default initialized to false
-    std::array<std::atomic_bool, mf_n_concurrent_objects> used_objects;
+    extern std::array<std::atomic_bool, mf_n_concurrent_objects> used_objects;
 
     template <typename NumberType>
     using DataArray = NumberType[data_array_size];
index 52aee019b9557f4fe0a622e1d0e6292abb64f3b9..9bd1a0a52d492aec443520f90dfd1a93150a4d9c 100644 (file)
 
 DEAL_II_NAMESPACE_OPEN
 
+
+
 namespace CUDAWrappers
 {
+  namespace internal
+  {
+    extern std::array<std::atomic_bool, mf_n_concurrent_objects> used_objects;
+  }
+
   // Do not instantiate for dim = 1
   template class MatrixFree<2, float>;
   template class MatrixFree<2, double>;

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.