标准C ++事务内存状态 [英] Standard C++ transactional memory status

查看:112
本文介绍了标准C ++事务内存状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++ 17的事务性内存建议的当前状态是什么?是将其包含在标准中,旨在包含在将来的标准C ++版本中,还是仅是一种实验性的概念验证功能,其标准化状态仍未确定?

What is the current status of transactional memory proposal for C++17. Is it going to be included in the standard, aimed at being included in some future version of standard C++ or is only an experimental proof-of-concept feature, with its standardization status still undetermined?

我之所以问是因为标准化委员会的某些文件似乎在这里提供了矛盾的沟通。一方面,我们有P0265R0( http:/ /www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0265r0.pdf )说,事务性存储将不被标准化-另一方面,有一篇N4492 Stroustrup( http://www.open-std .org / jtc1 / sc22 / wg21 / docs / papers / 2015 / n4492.pdf ),并且在C ++ 17功能列表中列出了事务性内存。

I'm asking because some of the standardization committee's documents seem to give contradictory communication here. On the one hand we have P0265R0 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0265r0.pdf) saying that transactional memory is not going to be standardized, on the other hand - there's a N4492 paper by Stroustrup (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4492.pdf) with transactional memory listed in C++17 feature list.

推荐答案

足够简短:事务性存储器TS已经发布,并且正在开发第二个版本。但是,委员会不打算在近期功能中将其包含在标准中。做出此选择的原因有很多:

Shortly enough: the transactional memory TS is already published, and a second version is being developed. However, the committee does not plan to include it in the standard in the near feature. There are several reasons for this choice:


  • 没有足够的实施经验。从GCC6开始,只有g ++实施它。 TS的目标部分是为了收集实施和用户体验,因此相对而言,这么大的功能还是不成熟。

  • There isn't enough implementation experience. Only g++ implements it since GCC6. The goal of TSs is partly to gather implementation and user experience, so such a big feature is still too « immature » with regard to that.

并非每个目标支持事务性内存,并且实现成本很高,但并不是每个人都需要它。由于这些原因,委员会显然不确定TS是否应该成为主要C ++标准的一部分。

Not every target supports transactional memory, and it has a high implementation cost while not everyone needs it. For these reasons, the committee is apparently unsure whether the TS should be part of the main C++ standard at all. It might as well forever live as a TS.

此外,并非所有人都认为事务性存储器TS的每个功能都值得包含在主要的C ++标准中。 。一些人发现 synchronized 是主要功能,而另一些人则认为原子块是真正的游戏规则改变者。 TS 确实增加了库实现者必须处理的另一认知开销(以及几个新关键字,通常认为这不是一件好事)。

Moreover, not everyone believes that every feature of the transactional memory TS are worth being included in the main C++ standard. Some find that synchronized is the main feature, while other believe that atomic blocks are the real game changer. The TS does add another cognitive overhead that library implementers will have to deal with (as well as several new keywords, which isn't generally seen as a good thing).

这篇关于标准C ++事务内存状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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