如何在C ++ 1z中使用实验性并行STL? [英] How to use experimental parallel STL in C++1z?

查看:201
本文介绍了如何在C ++ 1z中使用实验性并行STL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想尝试C ++ 17的并行STL.但是,我在libc ++中找不到experimental/execution_policy.我该如何尝试?

I want to try parallel STL of C++17. However, I can't find experimental/execution_policy in libc++. How can I try this?

我正在尝试 http://en.cppreference.com/w/cpp /experimental/reduce ,表示我应该包含这些文件,但是找不到执行策略.

I'm trying http://en.cppreference.com/w/cpp/experimental/reduce, which says I should include these files, but I cannot find execution_policy.

#include <experimental/execution_policy>

在我安装libc ++之后(我跟随 http://libcxx.llvm.org/docs/BuildingLibcxx.html ),我尝试了以下命令,但没有成功.

After I install libc++ (I followed http://libcxx.llvm.org/docs/BuildingLibcxx.html), I tried the following commands, but in vain.

$ clang++-3.5 -std=c++1z test.cpp -lc++experimental
test.cpp:5:10: fatal error: 'experimental/execution_policy' file not found
#include <experimental/execution_policy>
         ^
1 error generated.

这还没有实现吗?

推荐答案

这还没有实现吗?

Is this not implemented yet?

那是正确的.尚未在libc ++中实现并行度TS(将驻留在<experimental/xxx>中,也未实现C ++ 1z标准中的并行算法(尚未最终实现).

That is correct. Neither the parallelism TS (which would live in <experimental/xxx> or the parallel algorithms in the (not yet final) C++1z standard have been implemented in libc++ (yet).

这篇关于如何在C ++ 1z中使用实验性并行STL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆