]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Instantiate GrowingVectorMemory for CUDAWrappers::Vector 6245/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 13 Apr 2018 20:40:21 +0000 (16:40 -0400)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 16 Apr 2018 14:38:44 +0000 (14:38 +0000)
source/lac/vector_memory.cc
tests/cuda/solver_01.cu

index f94356da5221e388262d84dde72e43ca887da8cf..8a399fce73b934fb1482cf689cbfcf689625445d 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/block_vector.h>
+#include <deal.II/lac/cuda_vector.h>
 #include <deal.II/lac/la_vector.h>
 #include <deal.II/lac/la_parallel_vector.h>
 #include <deal.II/lac/la_parallel_block_vector.h>
@@ -30,6 +31,13 @@ DEAL_II_NAMESPACE_OPEN
 
 #include "vector_memory.inst"
 
+#ifdef DEAL_II_WITH_CUDA
+template class VectorMemory<LinearAlgebra::CUDAWrappers::Vector<float>>;
+template class VectorMemory<LinearAlgebra::CUDAWrappers::Vector<double>>;
+template class GrowingVectorMemory<LinearAlgebra::CUDAWrappers::Vector<float>>;
+template class GrowingVectorMemory<LinearAlgebra::CUDAWrappers::Vector<double>>;
+#endif
+
 namespace internal
 {
   namespace GrowingVectorMemoryImplementation
@@ -37,6 +45,11 @@ namespace internal
     void release_all_unused_memory()
     {
 #include "vector_memory_release.inst"
+
+#ifdef DEAL_II_WITH_CUDA
+      dealii::GrowingVectorMemory<dealii::LinearAlgebra::CUDAWrappers::Vector<float>>::release_unused_memory();
+      dealii::GrowingVectorMemory<dealii::LinearAlgebra::CUDAWrappers::Vector<double>>::release_unused_memory();
+#endif
     }
   }
 }
index 1389a5be80b2d30566a2b5ef4e15693223be9f66..48940f0a626e5af71ce7e9abbd638367827003e6 100644 (file)
@@ -18,9 +18,6 @@
 #include "../tests.h"
 #include "../testmatrix.h"
 
-#include <deal.II/lac/vector_memory.h>
-#include <deal.II/lac/vector_memory.templates.h>
-
 #include <deal.II/base/exceptions.h>
 #include <deal.II/lac/cuda_sparse_matrix.h>
 #include <deal.II/lac/precondition.h>

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.