Making TBB a bit easier…

I don’t like having to manually set the various properties in order to get a TBB program to compile. So I built a Visual C++ 2005 project template that does it for me. All I have to do is click on the New Project button, select Win32 as the project type and Win32 Console Application using TBB as the template. That automatically sets the properties to use TBB and presents a top-level .cpp file that already contains the TBB include files.

You can download the installer for the TBB project template here.

By default, the project template expects that you have modified the PATH environment variable to include the directory where the DLLs are stored: %TBB20_INSTALL_DIR%\ia32\vc8\bin. If you want to use the method where the TBB DLLs are copied to the application directory before it is run, then you can uncomment lines 46, 51-52, 57 and 62-63 in the file default.js at C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\ApplicationTBB\scripts\1033.

If you want to know how to make or modify a VC++ project template, this is a good place to start.

About dave_vandenbout
President of XESS Corp, a manufacturer of FPGA development boards.

3 Responses to Making TBB a bit easier…

  1. Pingback: Intel® Software Network Blogs » Threading Building Blocks Template for Visual Studio Now Available

  2. llpanorama says:

    Sure, you can post it anywhere you like.

    I’m not sure about the compiler settings in the template. The defaults seem to give OK performance. If someone has made a comparative study, then I should probably update the template to use the best compiler settings.

    It would also be nice if the template let you select a particular construct (e.g. parallel_for) and then would place a code skeleton for that construct into the main C++ file. I can see how the template mechanism allows that, but I’m not expert enough in the TBB constructs to do that for each one. Perhaps someone else is already doing that.

  3. kfarnham says:

    I think it would be great to make this available for download on the Threading Building Blocks Sourceforge site (we use that for TBB “accessories”). Let me know if I can post it for download there.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: