已经实现了C ++ 17并行算法吗? [英] Are C++17 Parallel Algorithms implemented already?

查看:232
本文介绍了已经实现了C ++ 17并行算法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图尝试使用C ++ 17标准中提出的新并行库功能,但无法使其正常工作.我尝试使用最新版本的g++ 8.1.1clang++-6.0-std=c++17进行编译,但似乎都不支持#include <execution>std::execution::par或任何类似的版本.

I was trying to play around with the new parallel library features proposed in the C++17 standard, but I couldn't get it to work. I tried compiling with the up-to-date versions of g++ 8.1.1 and clang++-6.0 and -std=c++17, but neither seemed to support #include <execution>, std::execution::par or anything similar.

查看并行算法的 cppreference 时,一长串算法,声称

When looking at the cppreference for parallel algorithms there is a long list of algorithms, claiming

技术规范为algorithmnumericmemory提供了以下69种算法的并行版本:(...长列表...)

Technical specification provides parallelized versions of the following 69 algorithms from algorithm, numeric and memory: ( ... long list ...)

听起来算法已经准备好了,但还没准备好使用吗?

which sounds like the algorithms are ready 'on paper', but not ready to use yet?

此SO问题中,一年前的答案声称尚未实现这些功能.但是到现在为止,我已经期望看到某种实现.我们已经可以使用任何东西了吗?

In this SO question from over a year ago the answers claim these features hadn't been implemented yet. But by now I would have expected to see some kind of implementation. Is there anything we can use already?

推荐答案

您可以引用 https: //en.cppreference.com/w/cpp/compiler_support 来检查所有C++功能实施状态.对于您的情况,只需搜索"Standardization of Parallelism TS",您将发现仅MSVCIntel C++编译器现在支持此功能.

You can refer https://en.cppreference.com/w/cpp/compiler_support to check all C++ feature implementation status. For your case, just search "Standardization of Parallelism TS", and you will find only MSVC and Intel C++ compilers support this feature now.

这篇关于已经实现了C ++ 17并行算法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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