tbb::pipeline problem

tbb::pipeline problem

The following code in simple project in Microsoft Visual Studio 2010 with Intel Parallel Studio 2011 (Intel Parallel Composer 2011 beta Update 2 (Package ID: composer_2011_beta_update2.031)) always produces an error.

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
	tbb::pipeline* p = new tbb::pipeline;
	delete p;
	return 0;

Message dialog box:

Windows has triggered a breakpoint in TestPipeline.exe.
This may be due to a corruption of the heap, which indicates a bug in TestPipeline.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while TestPipeline.exe has focus.
The output window may have more diagnostic information.

Test project is attached.

Download TestPipeline.rar2.77 KB
В действительности всё не так, как на самом деле...
2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Thanks for your example code.

I suppose that you missed some steps, see below:

1. You should addINCLUDE files at header of file
#include "tbb/pipeline.h"
#include "tbb/task_scheduler_init.h"
#include "tbb/allocator.h"

2. You have to start "tbb::task_scheduler_init" first in code

3. Then you can create the pipeline, like as "tbb::pipeline pipeline"

4. Defining/doing some filters, like as "pipeline.add_filter ( filterN); The user can define how that filter works for stream, files.

5. Last step is to run pipeline.run ()

There is one simple example to use tbb::pipeline, under tbb\examples\pipeline for your reference.

Regards, Peter

Faça login para deixar um comentário.