From: Wolfgang Bangerth Date: Tue, 31 Jan 2017 22:50:08 +0000 (-0700) Subject: Work around a problem when using very old TBB versions. X-Git-Tag: v8.5.0-rc1~170^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2df338bc3c83b54ab8121631982fbdf24c06036;p=dealii.git Work around a problem when using very old TBB versions. --- 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 }