gcc C++并行STL矢量化算法未实现p2408

mitkmikd  于 2024-01-08  发布在  其他
关注(0)|答案(1)|浏览(74)

我用g++ 14.0.0编译了下面的C++代码:

g++ -I/path/to/c++/14.0.0 -L/path/to/c++/libstdc++ -ltbb -std=c++23 -o main main.cc

个字符
代码编译了,但我得到了警告

In function ‘_RandomAccessIterator __pstl::__internal::__brick_unique(_RandomAccessIterator, _RandomAccessIterator, _BinaryPredicate, std::true_type)’:
note: ‘#pragma message:  [Parallel STL message]: "Vectorized algorithm unimplemented, redirected to serial"’
 1219 |     _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial");


我正在配置gcc

./configure --prefix=/path/to/install/dir --disable-multilib --with-system-zlib --enable-default-pie --enable-default-ssp --disable-fixincludes --with-mpfr=/path/to/mpfr --with-mpc=/path/to/mpc --with-gmp=/path/to/gmp --enable-languages=c,c++,fortran,go,lto,m2,objc,obj-c++ --no-create --no-recursion


config.log具有变量PKG_CONFIG_PATH,该变量具有到MKL TBB的正确路径。
我认为p2408是按照this post实现的。
有人知道我做错了什么吗?TBB安装了
代码似乎有同样的问题on godbolt

i7uaboj4

i7uaboj41#

根据cppreference上的compiler support guide,只有MSVC版本19.34及更高版本支持p2408R5。

相关问题