You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The VFX reference platform for 2023 and later is still on this older branch of tbb and I'm wanting to use that with the latest icx compiler. In tbb_config.h on Windows, we drop into the __clang__ section and the detection of whether rvalue references goes awry because we are neither using libc++ nor glibc on Windows. This then disables the emplace method.
Here is the relevant section in tbb/tbb_config.h:
#elif __clang__
/** TODO: these options need to be rechecked **/
...
#define __TBB_CPP11_RVALUE_REF_PRESENT (__has_feature(__cxx_rvalue_references__) && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40500))
and you can see that __TBB_CPP11_RVALUE_REF_PRESENT is going to come out as zero even though __has_feature(__cxx_rvalue_references__) will return 1.
A few lines down in the same __clang__ section we see std::begin and end are also disabled for the same reason.
Not knowing precisely why libc++ and glibc come into this calculation I could not confidently suggest a solution, but in my instance, which I think would be fairly broad I can modify both of those lines to use the following:
Hi, I can't surely tell for the TBB 2020 but it seems that it just wasn't intended to fall under __clang__ branch on Windows, but since icx is LLVM-based we do. I think your code change is valid.
The problem is that development of TBB (with last official version - 2020.U3) was stopped before icx (LLVM based Intel compiler) was released so that's why we can observe such issues.
On a first glance this solution can be used as a workaround.
The VFX reference platform for 2023 and later is still on this older branch of tbb and I'm wanting to use that with the latest icx compiler. In tbb_config.h on Windows, we drop into the
__clang__
section and the detection of whether rvalue references goes awry because we are neither using libc++ nor glibc on Windows. This then disables the emplace method.Here is the relevant section in tbb/tbb_config.h:
and you can see that
__TBB_CPP11_RVALUE_REF_PRESENT
is going to come out as zero even though__has_feature(__cxx_rvalue_references__)
will return 1.A few lines down in the same
__clang__
section we seestd::begin
andend
are also disabled for the same reason.Not knowing precisely why libc++ and glibc come into this calculation I could not confidently suggest a solution, but in my instance, which I think would be fairly broad I can modify both of those lines to use the following:
so enable if clang, has rvalue references, and is on Windows with Visual Studio 2019 or better compiler.
The text was updated successfully, but these errors were encountered: