From: Matthias Maier Date: Tue, 11 Jan 2022 21:25:55 +0000 (-0600) Subject: make define guards more robust X-Git-Tag: v9.3.3~5^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93d743aa8cff79a1c5b842dc8918119afa70f21b;p=dealii.git make define guards more robust --- diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 333b4d76c1..bd9355f523 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -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::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::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, @@ -2201,8 +2198,4 @@ MatrixFree::print(std::ostream &out) const DEAL_II_NAMESPACE_CLOSE -#ifdef DEAL_II_TBB_WITH_ONEAPI -# define DEAL_II_WITH_TBB -#endif - #endif diff --git a/source/matrix_free/task_info.cc b/source/matrix_free/task_info.cc index 755d9fcde9..e5de06eaa4 100644 --- a/source/matrix_free/task_info.cc +++ b/source/matrix_free/task_info.cc @@ -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) {