Using Intel's TBB on Win7 and VS2013

Source: Internet
Author: User

Source Address: http://www.th7.cn/system/win/201505/103966.shtml

Http://wenku.baidu.com/link?url=zH7vwmWltWF5R-9YGUDq5oSszkoWDxknBJmZkFY4w6FzV1P55h5XClOCd6UoB3tYCYjYt0ee_ Qw6k4gevvi82jegcs2cdgjmqutwqwozqj3

Http://wenku.baidu.com/link?url=aDjwQPp3YH6ns0LKJI7MIGzlLJrRSYbZrT_ Da7ry6kbsnt6fkhbgbsg1fa22hafmpuy6ahjvu6n-l7xuk2nls9ldkoo5tqgitj45odh9wfe

Used on Win7 and VS2013
Intel's TBB
1.Software version
Visual Studio 2013
TBB 4.3 Update 1 (tbb43_20141023oss_win.zip)
2.InstallationTBB
Tbb,thread Building Blocks, a threading building block, is a tool developed by Intel Corporation for parallel programming.
TBB can run on Windows,linux and OSX, supporting Intel, Microsoft, and GNU tools, which
Cover the vast majority of the demand range. Compared to OpenMP, TBB does not need to rely on the compiler directive Progma to
Programming, more easy to use.
The Software installation package can be downloaded from this website:
https://www.threadingbuildingblocks.org
I downloaded the 4.3 version, which was released on November 11, 2014.
Https://www.threadingbuildingblocks.org/sites/default/files/software_releases/window
S/tbb43_20141023oss_win.zip
After extracting the tbb43_20141023oss_win.zip, it can be used without installation.
3.Setting environment variables
This sets up two environment variables, one is to add the TBB Bin directory to the system PATH, and the second is to define a
A new environment variable, tbbroot, which is used in subsequent Visual Studio engineering files.
My bin directory is placed in: d:/TBB43_20141023OSS/BIN/INTEL64/VC12
tbbroot= d:/Tbb43_20141023oss
2
4.EstablishVisual StudioEngineering
Here are the simplest examples to illustrate TBB programming.
First, create a blank project file. Select Win32 Console Application. My project is named
Testtbb
Select a blank project.
3
5.Add aC + +Source code files
Right-click the project's Source Files, select Add New Item on the popup menu.
File type Select C + + file (. cpp) files.
6.Choose --Bit Engineering
Default new project for Win32 program, now commonly used is the x64 program, so manually add in. There is no straight
How to connect the new x64 project? You know, leave a message.
The add process is as follows:
Right click on the project, select "Properties", click "Configuration Manager".
4
Select "New" in "Active solution platform".
Select "Platform"? "x64"
5
7.Set upINCLUDEAndLIBPath
To compile the target Release | x64 for example. Right-click the "Release |" button in the project properties first. x64 ",
Select "Add New Project Property Sheet". Add a "tbb_release_x64.props" property file.
Edit this property file (right mouse button?) Properties), in the "C + +"? General "?" Additional
Include Directory "Plus" $ (tbbroot)/include "
6
Similarly, in "Linker"? General "?" Additional Library Directory "plus
"$ (tbbroot)/lib/intel64/vc12".
In "Linker"? Input "?" Additional Dependencies "Add" tbb.lib ".
Note that this is not directly modified in the project properties file, but instead adds a separate property file and uses the
The TBBROOT environment variable. This allows you to use this property file directly when you create a new project, and
No more step-by-step setup is required. Similarly, after the TBB path changes, there is no need to modify the project properties, but to modify
environment variable Tbbroot. The versatility of doing this will be better.
Similarly, modify Debug | x64, add a Tbb_debug_x64.props property file.
The whole project has been established.
7
8.Compile run
Refer to the TBB sample program for an example of Getting Start:
Tbb43_20141023oss/examples/gettingstarted/sub_string_finder/sub_string_finder.cpp
Write your own TBB program and experiment with the results.

Using Intel's TBB on Win7 and VS2013

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.