From c2df338bc3c83b54ab8121631982fbdf24c06036 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 31 Jan 2017 15:50:08 -0700 Subject: [PATCH] Work around a problem when using very old TBB versions. --- include/deal.II/base/thread_management.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 28d94bd288..c1d81dda72 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -42,6 +42,7 @@ # include # endif # include +# include #endif @@ -2918,7 +2919,17 @@ namespace Threads task->set_ref_count (2); tbb::task *worker = new (task->allocate_child()) TaskEntryPoint(*this); + + // in earlier versions of the TBB, task::spawn was a regular + // member function; however, in later versions, it was converted + // into a static function. we could always call it as a regular member + // function of *task, but that appears to confuse the NVidia nvcc + // compiler. consequently, the following work-around: +#if TBB_VERSION_MAJOR >= 4 tbb::task::spawn (*worker); +#else + task->spawn (*worker); +#endif } -- 2.39.5