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

index 333b4d76c161db6994388e2e3dc1e2ee32c93fb9..bd9355f523895839ef232f3def428ce64302da93 100644 (file)
@@ -67,9 +67,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
 
@@ -456,7 +453,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)
         {
@@ -932,7 +929,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
@@ -1513,7 +1510,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>,
@@ -2201,8 +2198,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 755d9fcde98cbe60191b1448cc10fc8141b1b449..e5de06eaa474f0dcbe18acf66aaf1c674806d582 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.