X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tbb%2Finclude%2Ftbb%2Fparallel_invoke.h;h=6cc38e26534ff1a4ef4087e174887b290faeecb4;hb=4c96b4064a92f65beead3cb2453d727187bed40f;hp=3303c41a55d25b41dab82748cb44fa90b31edc1c;hpb=46ab0514ba58ee00183ff0584c7ea7c9e3d76494;p=casparcg diff --git a/tbb/include/tbb/parallel_invoke.h b/tbb/include/tbb/parallel_invoke.h index 3303c41a5..6cc38e265 100644 --- a/tbb/include/tbb/parallel_invoke.h +++ b/tbb/include/tbb/parallel_invoke.h @@ -33,6 +33,11 @@ namespace tbb { +#if !__TBB_TASK_GROUP_CONTEXT + /** Dummy to avoid cluttering the bulk of the header with enormous amount of ifdefs. **/ + struct task_group_context {}; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + //! @cond INTERNAL namespace internal { // Simple task object, executing user method @@ -137,8 +142,15 @@ namespace internal { // The class destroys root if exception occured as well as in normal case class parallel_invoke_cleaner: internal::no_copy { public: - parallel_invoke_cleaner(int number_of_children, tbb::task_group_context& context) : root(*new(task::allocate_root(context)) internal::parallel_invoke_helper(number_of_children)) +#if __TBB_TASK_GROUP_CONTEXT + parallel_invoke_cleaner(int number_of_children, tbb::task_group_context& context) + : root(*new(task::allocate_root(context)) internal::parallel_invoke_helper(number_of_children)) +#else + parallel_invoke_cleaner(int number_of_children, tbb::task_group_context&) + : root(*new(task::allocate_root()) internal::parallel_invoke_helper(number_of_children)) +#endif /* !__TBB_TASK_GROUP_CONTEXT */ {} + ~parallel_invoke_cleaner(){ root.destroy(root); }