#include <deal.II/base/config.h>
+#include <deal.II/base/kokkos.h>
+
#include <exception>
#include <ostream>
#include <string>
# include <cusparse.h>
#endif
-DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
-#include <Kokkos_Core.hpp>
-DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
-
DEAL_II_NAMESPACE_OPEN
})) \
KOKKOS_IF_ON_DEVICE(({ \
if (!(cond)) \
- Kokkos::abort(#cond); \
+ dealii::internal::kokkos_abort(#cond); \
})) \
}
# else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
})) \
KOKKOS_IF_ON_DEVICE(({ \
if (!(cond)) \
- Kokkos::abort(#cond); \
+ dealii::internal::kokkos_abort(#cond); \
})) \
}
# endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
}
# endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
# else /*#ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
-# define Assert(cond, exc) \
- { \
- if (!(cond)) \
- Kokkos::abort(#cond); \
+# define Assert(cond, exc) \
+ { \
+ if (!(cond)) \
+ dealii::internal::kokkos_abort(#cond); \
}
# endif /*ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
# endif /*KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
*/
void
ensure_kokkos_initialized();
+
+ /**
+ * Calls Kokkos::abort. This wrapper avoids including Kokkos_Core.hpp, which
+ * provides all of Kokkos' functionalities, on the call side.
+ */
+ KOKKOS_FUNCTION void
+ kokkos_abort(const char *error);
+
} // namespace internal
DEAL_II_NAMESPACE_CLOSE
#include <deal.II/base/config.h>
#include <deal.II/base/exceptions.h>
+#include <deal.II/base/kokkos.h>
#include <deal.II/base/numbers.h>
#include <deal.II/base/table_indices.h>
#include <deal.II/base/template_constraints.h>
KOKKOS_IF_ON_DEVICE(({
(void)val;
(void)s;
- Kokkos::abort(
+ dealii::internal::kokkos_abort(
"This function is not implemented for std::complex<Number>!\n");
}))
# else
# else
(void)val;
(void)s;
- Kokkos::abort(
+ dealii::internal::kokkos_abort(
"This function is not implemented for std::complex<Number>!\n");
# endif
# endif