任何与英特尔的线程构建块的经验? [英] Any experiences with Intel's Threading Building Blocks?

查看:152
本文介绍了任何与英特尔的线程构建块的经验?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

英特尔的线程构建模块(TBB)开源库看起来非常有趣。即使有关于这个主题的 O'Reilly Book ,我也不知道很多人使用它。我有兴趣在Unix(Mac,Linux等)环境中将它用于一些多级并行应用程序(MPI +线程)。对于什么是值得的,我对高性能计算/数值方法的应用感兴趣。

Intel's Threading Building Blocks (TBB) open source library looks really interesting. Even though there's even an O'Reilly Book about the subject I don't hear about a lot of people using it. I'm interested in using it for some multi-level parallel applications (MPI + threads) in Unix (Mac, Linux, etc.) environments. For what it's worth, I'm interested in high performance computing / numerical methods kinds of applications.

有没有人有TBB的经验?它工作得很好吗?它是相当便携(包括GCC和其他编译器)?这个范式对你写的程序有效吗?有没有其他库我应该研究?

Does anyone have experiences with TBB? Does it work well? Is it fairly portable (including GCC and other compilers)? Does the paradigm work well for programs you've written? Are there other libraries I should look into?

推荐答案

我已经把它引入我们的代码库,因为我们需要一个bettor malloc当我们搬到16核机器时使用。与8和以下它不是一个重大问题。它对我们工作很好。接下来我们计划使用细粒度的并发容器。理想情况下,我们可以利用产品的真正肉类,但这需要重新思考我们如何构建我们的代码。我真的很喜欢TBB中的想法,但是不容易翻译到代码库。

I've introduced it into our code base because we needed a bettor malloc to use when we moved to a 16 core machine. With 8 and under it wasn't a significant issue. It has worked well for us. We plan on using the fine grained concurrent containers next. Ideally we can make use of the real meat of the product, but that requires rethinking how we build our code. I really like the ideas in TBB, but it's not easy to retrofit onto a code base.

你不能将TBB当作另一个线程库。他们有一个全新的模型,真正坐在线程和抽象线程之外。你学会在任务,parallel_for类型操作和管道中思考。如果我要建立一个新的项目,我可能会尝试以这种方式模型。

You can't think of TBB as another threading library. They have a whole new model that really sits on top of threads and abstracts the threads away. You learn to think in task, parallel_for type operations and pipelines. If I were to build a new project I would probably try to model it in this fashion.

我们在Visual Studio中工作,效果很好。它最初是为linux / pthreads编写的,所以它也运行得很好。

We work in Visual Studio and it works just fine. It was originally written for linux/pthreads so it runs just fine over there also.

这篇关于任何与英特尔的线程构建块的经验?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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