https://github.com/yuki-koyama/hello-tbb-cmake
A hello-world project for testing "parallel_for" in Intel TBB. The whole project (including TBB) is built using CMake.
https://github.com/yuki-koyama/hello-tbb-cmake
cmake tbb
Last synced: 2 months ago
JSON representation
A hello-world project for testing "parallel_for" in Intel TBB. The whole project (including TBB) is built using CMake.
- Host: GitHub
- URL: https://github.com/yuki-koyama/hello-tbb-cmake
- Owner: yuki-koyama
- License: mit
- Created: 2018-06-14T09:47:37.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-15T01:09:30.000Z (almost 7 years ago)
- Last Synced: 2025-01-17T13:27:37.024Z (4 months ago)
- Topics: cmake, tbb
- Language: C++
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hello TBB CMake
A hello-world project for testing `parallel_for` in Intel(R) Threading Building Blocks (TBB). The whole project, including TBB, is built using CMake.
## How It Works
Wenzel Jakob (a great researcher) provides a repository containing TBB and CMake files for building TBB: .
This hello-world repository includes Wenzel's TBB as a gitsubmodule, which is built using CMake's `ExternalProject_Add` command.
## Dependency
-
## Clone, Compile, and Run
### Clone
```
git clone https://github.com/yuki-koyama/hello-tbb-cmake.git --recursive
```Do not forget to add the `--recursive` option.
### Compile
```
mkdir build
cd build
cmake ../hello-tbb-cmake
make
```### Run
```
./hello-tbb-cmake
```This program solves a numerical optimization problem 1,000,000 times with different initial solutions. First, it performs this task in parallel, and then it performs the same task in a single thread. Finally, it displays the elapsed times like:
```
parallel: 361 [ms]
serial: 1245 [ms]
```## License
MIT License.