Skip to content

Commit 95edf79

Browse files
authored
Merge pull request dealii#18216 from bangerth/include
Move an #include statement.
2 parents 008bb63 + 9489822 commit 95edf79

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

include/deal.II/base/exception_macros.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,6 @@
1717

1818
#include <deal.II/base/config.h>
1919

20-
// The #defines of the Assert* macros below reference functions and
21-
// classes that are declared in exceptions.h. This is ok -- places
22-
// that use the Assert macro (for example) simply have to #include
23-
// <deal.II/base/exceptions.h> or, in the case of C++20 modules, use
24-
// the fact that we let exceptions.h export this stuff into the dealii
25-
// module. But the exception machinery also references Kokkos
26-
// functions, which exceptions.h cannot export into the module. The
27-
// places that use exceptions must know about these functions, and to
28-
// avoid them all having to include Kokkos headers, we have to do it
29-
// here:
30-
DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
31-
#include <Kokkos_Macros.hpp>
32-
#if KOKKOS_VERSION >= 40200
33-
# include <Kokkos_Abort.hpp>
34-
#else
35-
# include <Kokkos_Core.hpp>
36-
#endif
37-
DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
38-
39-
4020

4121
/**********************************************************************
4222
* Preprocessor definitions in support of declaring exception classes.

include/deal.II/base/exceptions.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@
2020
#include <deal.II/base/exception_macros.h>
2121
#include <deal.II/base/numbers.h>
2222

23+
// The exception machinery (including the macros defined in
24+
// exception_macros.h) references Kokkos functions. The places that
25+
// use exceptions must know about these functions, and to avoid them
26+
// all having to include Kokkos headers, we have to do it here:
27+
DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
28+
#include <Kokkos_Macros.hpp>
29+
#if KOKKOS_VERSION >= 40200
30+
# include <Kokkos_Abort.hpp>
31+
#else
32+
# include <Kokkos_Core.hpp>
33+
#endif
34+
DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
35+
36+
2337
#include <exception>
2438
#include <ostream>
2539
#include <string>

0 commit comments

Comments
 (0)