From e71ff27e7a7b118c8302915349c525d933899844 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 4 Sep 2024 17:53:07 -0400 Subject: [PATCH] NVCC: work around compiler bug --- include/deal.II/lac/petsc_matrix_base.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/deal.II/lac/petsc_matrix_base.h b/include/deal.II/lac/petsc_matrix_base.h index 6c7d866ab6..4e87ac7d36 100644 --- a/include/deal.II/lac/petsc_matrix_base.h +++ b/include/deal.II/lac/petsc_matrix_base.h @@ -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 */ -- 2.39.5