From: Matthias Maier Date: Tue, 11 Jan 2022 21:25:55 +0000 (-0600) Subject: make define guards more robust X-Git-Tag: v9.4.0-rc1~622^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13179%2Fhead;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 3b91149a89..3b5c7dc046 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -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::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::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, @@ -2287,8 +2284,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 0338a3e423..be6bf7b9e6 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) {