您当前的位置: 首页 > 
  • 0浏览

    0关注

    1477博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

tbb::atomic和std::atomic的区别 废弃

软件工程小施同学 发布时间:2021-12-22 10:30:59 ,浏览量:0

tbb::atomic已经被废弃,可以使用std::atomic替代

 

https://www.intel.com/content/dam/develop/external/us/en/documents/tbbrevamp.pdf

tbb::atomic class (as well as multiple obsolete and compatibility features) was deprecated in TBB 2019 U9 (for more information see TBB Revamp topic). All of these features were removed in oneTBB 2021.

Consider using std::atomic as a replacement for tbb::atomic.

tbb::atomic was introduced when C++11 atomics were not invented yet. However, with C++11 tbb::atomic became obsolete and did not bring any value. Overall, C++11 atomics can be more efficient than tbb::atomic because they are recognizable by modern compilers and some additional optimization might take place.

关注
打赏
1665320866
查看更多评论
立即登录/注册

微信扫码登录

0.0423s