tbb

incorrect output with TBB pipeline

怎甘沉沦 提交于 2020-01-16 03:52:24
问题 I have written a C structure with different values (100 times) in text files such as 1.txt, 2.txt ... 100.txt I am using Intel TBB on Linux. I have created: InputFilter (serial_in_order MODE) TransformFIlter (serial_in_order MODE) OutputFilter (Serial_in_order MODE) The InputFilter reads structure from a file and passes it to TransformFilter. The TrasnformFilter updates the structure values and passes it to OutputFilter. The OutputFilter writes the new structure on the disc. Basically, it is

Using Intel TBB in debug mode

狂风中的少年 提交于 2020-01-15 04:56:09
问题 I am trying to debug a C++ code using Intel Thread Building Blocks, with the procedure I have found here Debugging in threading building Blocks. My question is related to the following sentence. Be sure to compile with the macro TBB_USE_DEBUG set to 1 so that TBB's checking will be enabled. I have added the macro #define TBB_USE_DEBUG 1 at the beginning of my main function. However, when compiling I get the following warning warning: "TBB_USE_DEBUG" redefined #define TBB_USE_DEBUG 1 /usr

how to get Threaded Building Blocks working in Ubuntu 14.04

╄→尐↘猪︶ㄣ 提交于 2020-01-12 23:28:13
问题 I want to get TBB working, but I'm having a little difficulty getting the compiling to work on Ubuntu 14.04. I think it is likely a problem with setting the location of libraries for the compiler. I installed TBB using the following command: sudo apt-get install libtbb-dev I have a small test example that I am now trying to compile. The code is as follows: #include "tbb/task_scheduler_init.h" int main(int argc, char* argv[]) { tbb::task_scheduler_init init; return 0; } The command I am

C++ tbb_debug.dll missing

萝らか妹 提交于 2020-01-12 11:39:29
问题 I'm new with openCV and I tried followed some tutorials. Everything worked fine until I included: opencv2/imgproc/imgproc.hpp and used the filter2D function. I got the following error when I start my program: "The program can't start because tbb_debug.dll is missing from your computer." On the internet I have found that this error has something to do with 32 and 64 bit versions of dlls. I'm using the 64bit version of windows and created a 32bit console application in VS2010 and the

bit test and set (BTS) on a tbb atomic variable

梦想与她 提交于 2020-01-07 06:27:08
问题 I want to do bitTestAndSet on a tbb atomic variable. atomic.h from tbb does not seem to have any bit operations. If I treat the tbb atomic variable as a normal pointer and do __sync_or_and_fetch gcc compiler doesn't allow that. Is there a workaround for this? Related question: assembly intrinsic for bit test and set (BTS) 回答1: A compare_and_swap loop can be used, like this: // Atomically perform i|=j. Return previous value of i. int bitTestAndSet( tbb::atomic<int>& i, int j ) { int o = i; //

error when compile opencv in qt applying tbb

寵の児 提交于 2020-01-06 20:04:38
问题 I Have the following issue when compiling opencv project in qt applying tbb dyld: Library not loaded: libtbb.dylib Referenced from: /usr/local/lib/libopencv_core.2.4.dylib Reason: image not found The program has unexpectedly finished. Can any friend tell me how to solve this problem? 回答1: Oh, I suddenly solved this problem by copy the libtbb.dylib to /usr/local/lib/ folder. Thank 回答2: The problem is when you are running your application it can't find the libraries to load. You need to set the

Thread Building Blocks concurrent_bounded_queue — how do I «close» it?

有些话、适合烂在心里 提交于 2020-01-04 02:28:12
问题 I am using concurrent_bounded_queue Intel TBB 4.1 Update 3 for communication between producer and consumer threads: concurrent_queue concurrent_bounded_queue The queue class has a method called abort which throws tbb::user_abort to all threads which block on pop and push of the queue instance. The communication between two threads may look like this: ConsThread | ProdThread -----------+------------- q.pop | get new data (wait) | q.push process | get new data q.pop | no more data! (wait) | q

Intel’s Threading Building Blocks “runtime exception” license: What does it mean? [closed]

ぃ、小莉子 提交于 2019-12-29 04:34:46
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Just been looking at the threading building blocks, and as their license, they say it's the GPLv2 with the runtime exception. On the Intel page itself they say that the commercial license is the right one if you need commercial support. So what's the deal if I'm doing a commercial, closed source application

应用在印刷机械的单双张纸张检测传感器

无人久伴 提交于 2019-12-26 15:45:32
随着自动检测和控制系统被广泛应用到各类印刷机械,使得印刷机械的效率速度越来越快,功能越来越强。接近传感器是自动控制系统的关键部件,由于马赫传感器其种类繁多,性能各异。而直接关系到印刷机械的速度和性能稳定性就需要谨慎选择传感器。 印刷机械纸张运行状态检测,单双张检测传感器,双张故障的出现对印刷质量影响较大,双张是印刷过程中最容易出现的故障之一。如果印刷过程中双张故障没有及时被检测出来,会造成印刷机器停机和机器过度磨损,从而降低工作效率并缩短印刷机使用寿命。 因此应用在印刷机械上面的单双张检测传感器推荐使用:TBB-30D25N1-D3、TBB-30D25P1-D3、TBB-30D25P1-DS12、TBB-30D25P2-DS12,一旦检测到两张纸的情况下,传感器的指示灯就会亮起,同时发出一个开关信号,检测到双张纸。 来源: 51CTO 作者: 2851512125 链接: https://blog.51cto.com/14504079/2461970

How to Disable Auto-link for TBB

萝らか妹 提交于 2019-12-25 04:08:44
问题 When I build my VS project as Debug, it always auto-linked with tbb_debug.lib (which in turn linked with tbb_debug.dll). Is there a way to override this and make tbb.lib linked even for a Debug build? 回答1: First, are you sure it is 'auto-linked'? If so, this is done using #pragma comment( lib, tbb_debug.lib ) . Find where this code is, modify it if it's yours, or else disbale it somehow (either by do not including the file where that code is, or by #defining something that disables this piece