tbb

How to install TBB from source on Linux and make it work

梦想与她 提交于 2019-12-03 03:49:11
I would like to know how to install TBB from source and make it work on a Linux system. I have had some problems when it comes using it, problems that don't appear if I install TBB via the package manager. In the TBB webpage, there are some guidelines on how about to do this, like setting the LD_LIBRARY_PATH and CPATH variables, or sourcing the tbbvars.sh file. Even if I do that, when I try to compile an example g++ says that tbb is not found. So the question is if it's an easy way on how to setup everything(compile the source code, what variables should I set...) in order to use TBB. Thanks.

How to statically link to TBB?

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How can I statically link the intel's TBB libraries to my application? I know all the caveats such as unfair load distribution of the scheduler, but I don't need the scheduler, just the containers, so it's ok. Anyways I know this can be done, although its undocumented, however I just can't seem to find the way to do it right now (although I've seen it before somewhere). So does anyone know or have any clues? thanks 回答1: EDIT - Changed to use extra_inc . Thanks Jeff! Build with the following parameter: make extra_inc = big_iron .

OpenCV TBB IPP OpenMP functions

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a list of functions/methods of OpenCV that have been optimized with IPP and/or TBB and/or OpenMP? 回答1: Disclaimer: I have no experience in OpenCV usage. I found no such a list on the official opencv.org site. However, the ChangeLog says : switched all the remaining parallel loops from TBB-only tbb::parallel_for() to universal cv::parallel_for_() with many possible backends (MS Concurrency, Apple's GDC, OpenMP, Intel TBB etc.) Now, we know what to search and grep -IRl parallel_for_ applied on opencv directory gives us the following:

How to install opencv with tbb enabled using mingw

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How to install Opencv with TBB enabled? I tried the following: 1) Downloaded the TBB package. 2) Build using the below command mingw32 - make compiler = gcc arch = ia32 runtime = mingw default 3) I set the Environmental variable path as "d:\tbb\build\windows_ia32_gcc_mingw_release 3) Now using cmake, I enabled "WITH_TBB" and compiled the opencv. its throwing the below error. [ 22 %] Built target pch_Generate_opencv_core Linking CXX shared library .. \. . \b in \libopencv_core245 . dll c : /mingw/ bin /../ lib / gcc / mingw32 / 4.6

QtCreator and TBB under Windows

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have compiled TBB from source using Mingw following the comment #5 in this post: http://software.intel.com/en-us/forums/topic/291331 . That went ok. When I try to use the new TBB library in a QtCreator project, I end with this errors (ignore the warning messages): http://postimage.org/image/yrrecugix/ Here's the sample code I tried (I omit the non-tbb code): #include "tbb/task_scheduler_init.h" int main () { tbb :: task_scheduler_init init ; /// more things. } And here's the .pro file: TEMPLATE = app CONFIG += console CONFIG -=

linux下Intel TBB、 Open MPI、OpenMP

匿名 (未验证) 提交于 2019-12-02 21:59:42
多核编程 简单来说,由于现在电脑CPU一般都有两个核,4核与8核的CPU也逐渐走入了寻常百姓家,传统的单线程编程方式难以发挥多核CPU的强大功能,于是多核编程应运而生。按照我的理解,多核编程可以认为是对多线程编程做了一定程度的抽象,提供一些简单的API,使得用户不必花费太多精力来了解多线程的底层知识,从而提高编程效率。这两天关注的多核编程的工具包括OpenMP和TBB。按照目前网上的讨论,TBB风头要盖过OpenMP,比如OpenCV过去是使用OpenMP的,但从2.3版本开始抛弃OpenMP,转向TBB。 Linux下TBB安装 1) 到官方网站下载最新的TBB源程序。 https://www.threadingbuildingblocks.org/ 2) 建立安装目录,这个目录就是用来装TBB库的,当然我们得先在目录里编译TBB源程序。比如: /opt/tbb/ 3) 将下载的文件解压到2.2文件夹中,切换到2.2文件夹: cd /opt/tbb/ make make之后等一会就编译好了。 4) 在shell中运行: source /opt/tbb/ build/linux_* _release/tbbvars.sh ( “ * ” 号部分根据不同的系统情况而不同 ) 5) 进入/opt/tbb//example目录随便找个例子make一下,如果通过了,说明安装成功。 补充:

Strange errors in intel's tbb

匆匆过客 提交于 2019-12-02 16:41:23
问题 I've build intel's tbb, and in my qt pro file I've included following line: INCLUDEPATH += "C:\\Downloads\\libraries\\tbb40_297oss\\include" but when I try to compile my project I'm getting an error: c:\Downloads\libraries\tbb40_297oss\include\tbb\internal\..\tbb_exception.h:340: error: 'exception_ptr' in namespace 'std' does not name a type Is there anything else I'm supposed to do? I cannot find any .lib files anywhere. 回答1: It is because you don't have _GLIBCXX_ATOMIC_BUILTINS_N (N = 1,2,4

Debugging in threading building Blocks

只谈情不闲聊 提交于 2019-12-02 03:51:38
I would like to program in threading building blocks with tasks. But how does one do the debugging in practice? In general the print method is a solid technique for debugging programs. In my experience with MPI parallelization, the right way to do logging is that each thread print its debugging information in its own file (say "debug_irank" with irank the rank in the MPI_COMM_WORLD) so that the logical errors can be found. How can something similar be achieved with TBB? It is not clear how to access the thread number in the thread pool as this is obviously something internal to tbb.

Using malloc instead of new, and calling the copy constructor when the object is created

半城伤御伤魂 提交于 2019-12-01 06:44:28
I wanted to try out TBB's scalable_allocator, but was confused when I had to replace some of my code. This is how allocation is done with the allocator: SomeClass* s = scalable_allocator<SomeClass>().allocate( sizeof(SomeClass) ); EDIT: What's shown above is not how allocation is done with scalable_allocator. As ymett correctly mentioned , allocation is done like this: int numberOfObjectsToAllocateFor = 1; SomeClass* s = scalable_allocator<SomeClass>().allocate( numberOfObjectsToAllocateFor ); scalable_allocator<SomeClass>().construct( s, SomeClass()); scalable_allocator<SomeClass>().destroy(s

AMD multi-core programming

▼魔方 西西 提交于 2019-12-01 05:45:34
I want to start to write applications(C++) that will utilize the additional cores to execute portions of the code that have a need to perform lots of calculations and whose computations are independent of each other. I have the following processor : x64 Family 15 Model 104 Stepping 2 Authentic AMD ~1900 Mhz running on Windows Vista Home premium 32 bit and Opensuse 11.0 64 bit. On the Intel platforms , I've used the following APIs Intel TBB, OpenMP. Do they work on AMD and does AMD have similar APIs.what has been your experience? OpenMP and TBB are both available also for AMD - it is also a