]> https://gitweb.dealii.org/ - dealii.git/commitdiff
NVCC: work around compiler bug 17660/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 4 Sep 2024 21:53:07 +0000 (17:53 -0400)
committerTimo Heister <timo.heister@gmail.com>
Wed, 4 Sep 2024 22:00:05 +0000 (18:00 -0400)
include/deal.II/lac/petsc_matrix_base.h

index 6c7d866ab6e2de31c375916ff237dffd37504aa3..4e87ac7d36b0d5ab37f3e2ddaf5e8ef17d8c40c0 100644 (file)
@@ -68,7 +68,15 @@ namespace PETScWrappers
      */
     class const_iterator
     {
+#  ifdef __CUDA_ARCH__
+      // NVCC, at least until 12.6, fails to compile the
+      // implementations of the nested Accessor class if
+      // it is declared as private. Work around this by
+      // making it public.
+    public:
+#  else
     private:
+#  endif
       /**
        * Accessor class for iterators
        */

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.