Intel® Threading Building Blocks

How to run task in the main thread while the execution of parallel_while?


In the main thread, we start to run parallel tasks with tbb::parallel_while. Now we have a requirement to create one separate new task and run it in the main thread during the execution of parallel_while. 

Firstly, I think we have to exclude the main thread from the worker threads of parallel_while.

Secondly, we have to create the new task and run it in the main thread.

Is this possible? How to accomplish both of these?



Invalid cxx_rvalue_references feature detection with clang.

It is impossible to use construct method from allocators with variadic template.

In TBB v4.3 Update 2 rvalue reference support is detected next way:

    #define __TBB_CPP11_RVALUE_REF_PRESENT             (__has_feature(__cxx_rvalue_references__) && (__TBB_GCC_VERSION >= 40300 || _LIBCPP_VERSION))

I'm using clang 3.6 from sources and not using libcpp, thus it is false. Also _TBB_GCC_VERSION is 4.2.1, so it is less than 40300. So rvalue reference is actually supported by my compiler, but detected as not supported in tbb_config.h.

HLE examples

Are there any examples codes that show an actual speedup using HLE (or tbb::speculative_spin_mutex)?

I have some experimental code running on a Haswell where the HLE flag is set when checked with cpuid, so I suppose HLE is enabled (I read that the feature HLE was disabled because of some problems but I don't think my target machine has the update requird to disbale the feature but IÄm not do I check if HLE is really enabled??)

Intel® Threading Building Blocks abonnieren