]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make define guards more robust 13179/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 11 Jan 2022 21:25:55 +0000 (15:25 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 11 Jan 2022 21:25:55 +0000 (15:25 -0600)
include/deal.II/matrix_free/matrix_free.templates.h
source/matrix_free/task_info.cc

index 3b91149a893035ef37bb74409b18dda5c4bd35b7..3b5c7dc0466d2ce1776564d35cf3f8686bc9852b 100644 (file)
@@ -68,9 +68,6 @@ DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 //
 // Matthias Maier, Martin Kronbichler, 2021
 //
-#ifdef DEAL_II_TBB_WITH_ONEAPI
-#  undef DEAL_II_WITH_TBB
-#endif
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -460,7 +457,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::internal_reinit(
 
         // initialize the basic multithreading information that needs to be
         // passed to the DoFInfo structure
-#ifdef DEAL_II_WITH_TBB
+#if defined(DEAL_II_WITH_TBB) && !defined(DEAL_II_TBB_WITH_ONEAPI)
       if (additional_data.tasks_parallel_scheme != AdditionalData::none &&
           MultithreadInfo::n_threads() > 1)
         {
@@ -922,7 +919,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_dof_handlers(
 
 namespace internal
 {
-#ifdef DEAL_II_WITH_TBB
+#if defined(DEAL_II_WITH_TBB) && !defined(DEAL_II_TBB_WITH_ONEAPI)
 
 #  ifdef DEAL_II_TBB_WITH_ONEAPI
   struct unsigned_int_pair_hash
@@ -1595,7 +1592,7 @@ namespace internal
         connectivity.reinit(task_info.n_active_cells, task_info.n_active_cells);
         if (do_face_integrals)
           {
-#ifdef DEAL_II_WITH_TBB
+#if defined(DEAL_II_WITH_TBB) && !defined(DEAL_II_TBB_WITH_ONEAPI)
             // step 1: build map between the index in the matrix-free context
             // and the one in the triangulation
             tbb::concurrent_unordered_map<std::pair<unsigned int, unsigned int>,
@@ -2287,8 +2284,4 @@ MatrixFree<dim, Number, VectorizedArrayType>::print(std::ostream &out) const
 
 DEAL_II_NAMESPACE_CLOSE
 
-#ifdef DEAL_II_TBB_WITH_ONEAPI
-#  define DEAL_II_WITH_TBB
-#endif
-
 #endif
index 0338a3e4238ba87695a6e8559d4bba5a6f671e14..be6bf7b9e63bc025cb211ec98fd3dad082bc4265 100644 (file)
@@ -51,9 +51,6 @@
 //
 // Matthias Maier, Martin Kronbichler, 2021
 //
-#ifdef DEAL_II_TBB_WITH_ONEAPI
-#  undef DEAL_II_WITH_TBB
-#endif
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -64,7 +61,7 @@ namespace internal
 {
   namespace MatrixFreeFunctions
   {
-#ifdef DEAL_II_WITH_TBB
+#if defined(DEAL_II_WITH_TBB) && !defined(DEAL_II_TBB_WITH_ONEAPI)
 
     // This defines the TBB data structures that are needed to schedule the
     // partition-partition variant
@@ -362,7 +359,7 @@ namespace internal
 
       funct.vector_update_ghosts_start();
 
-#ifdef DEAL_II_WITH_TBB
+#if defined(DEAL_II_WITH_TBB) && !defined(DEAL_II_TBB_WITH_ONEAPI)
 
       if (scheme != none)
         {

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.