Intel Threading Building Blocks
インテル スレッディング・ビルディング・ブロック (Intel® Threading Building Blocks, TBB) は、インテルが公開しているマルチ…
| 開発元 | インテル |
|---|---|
| 最新版 |
2022.0.0
/ 2024年11月1日[1] |
| リポジトリ | |
| プログラミング 言語 | C++ |
| 対応OS | Windows, Linux, macOS, Android[2] |
| 種別 | ライブラリ、フレームワーク |
| ライセンス | デュアルライセンス: 商用 / オープンソース (Apache License 2.0) |
| 公式サイト |
www software |
インテル スレッディング・ビルディング・ブロック (Intel® Threading Building Blocks, TBB) は、インテルが公開しているマルチスレッド対応のC++テンプレートライブラリである。マルチCPU・マルチコアCPUなどを搭載したコンピュータ上でアプリケーションを効率よく動作させることができる。
商用版とオープンソースソフトウェア版があり、オープンソース版は無償でダウンロードが可能である。バージョン4.4系列まではGPLv2[3]だったが、バージョン2017からはApache License 2.0となった[4]。
様々なプラットフォーム上で動作する(クロスプラットフォーム)。
概要
マルチCPU・マルチコアCPUを搭載したコンピュータ上でCPUリソースを効率よく利用することが目的であり、シングルCPU・シングルコアCPUでは性能向上は期待できない(スレッド切り替えのオーバーヘッドで逆にパフォーマンスが低下する可能性もある)。
公式に動作サポートされているハードウェアはIntel製のx86系プロセッサファミリーおよび互換プロセッサである。また公式に動作サポートされているオペレーティングシステム (OS) はWindows、Linux、macOS、Androidであり、それぞれのOSで実行させるために必要な外部ライブラリが別途提供される。Intelによらないコミュニティサポートのプラットフォームとしては、ARMアーキテクチャやFreeBSDなども含まれる[2]。
過去にはSolarisやXbox 360などへの対応も行われていた[5]。
TBBバージョン2018 Update 4のリリースノート[6]には、サポート環境に関して以下のように記載されている。
- ハードウェア(推奨)
- Microsoft Windows
- Intel Coreプロセッサーファミリー
- Intel Xeonプロセッサーファミリー
- Intel Xeon Phiプロセッサーファミリー
- Linux
- Intel Coreプロセッサーファミリー
- Intel Xeonプロセッサーファミリー
- Intel Xeon Phiプロセッサーファミリー
- OS X
- Intel Coreプロセッサーファミリー
- Android
- Intel Atomプロセッサーファミリー
- Microsoft Windows
- ハードウェア(サポート)
- Intel Pentium 4プロセッサーファミリー
- Intel Xeon Phiコプロセッサー
- Intel Atomプロセッサーファミリー
- 非インテルの上記互換プロセッサー
- サポートされるOS
- Microsoft Windows
- Linux
- CentOS 7.1
- Debian 8, 9
- Fedora 24, 25, 26
- Intel Cluster Ready
- Red Hat Enterprise Linux 6, 7
- SUSE Linux Enterprise Server 11, 12
- Ubuntu 14.04 LTS, 16.04 LTS, 17.04
- WindRiver Linux 8, 9
- Yocto 2.2, 2.3
- OS X* , macOS*
- Android
- Android 5.x, 6.x, 7.x, 8.x
- サポートされるコンパイラー
- Intel C++ Compiler 16, 17, 18
- Microsoft Visual C++ 12.0 (Microsoft Visual Studio 2013、Windows専用)
- Microsoft Visual C++ 14.0 (Microsoft Visual Studio 2015、Windows専用)
- Microsoft Visual C++ 14.1 (Microsoft Visual Studio 2017、Windows専用)
- Microsoft Windows SDK for Windows 8.1
- Microsoft Windows SDK for Windows 10
- サポートされるLinuxとともに提供・サポートされる標準のGCCバージョン
- GNU Compilers (gcc) 4.1 - 7.1
- GNU C Library (glibc) 2.4 - 2.19
- GNU Compilers (gcc) 4.1 - 7.1
- Xcode 6.3 - 9.1
- Android NDK r10e - r16
- サポートされる解析ツール
- Intel(R) VTune(TM) Amplifier XE 2017, 2018.
- Intel(R) Inspector XE 2017, 2018.
- Intel(R) Advisor XE 2017, 2018.
リリースノートで必要条件とされているシステムよりグレードの低いシステムでTBBを実行した結果については特に明示されていないが、Pentium III・Celeron Mなどでも正常動作が確認されている例がある[要出典]。
ライブラリの構成は
この内、タスクスケジューラおよびアロケータはTBBをサポートするクラスなので一般に開発者が使うことは少ない。
並列処理アルゴリズムはタスクスケジューラによって処理を分割してリソースに割り当てる。その為、コンテナやミューテックスなどを利用するときはタスクスケジューラの初期化は不要である。
また細分化する際の目安となるグレインサイズをプログラマが指定することも、TBBのランタイムライブラリが自動的に設定するようにすることも可能である。
主なクラス
- タスクスケジューラ
- task_sheduler_initクラス
- 並列処理アルゴリズム (Generic Parallel Algorithms)
- コンテナクラス
- concurrent_hash_mapクラス STLのmapクラスをスレッドセーフにしたもの
- concurrent_queueクラス STLのqueueクラスをスレッドセーフにしたもの
- concurrent_vectorクラス STLのvectorクラスをスレッドセーフにしたもの
- アシスタントクラス
- blocked_rangeクラス 線形範囲を示すクラス アルゴリズムやコンテナ走査に使用される
- blocked_range2dクラス 2次元範囲を示すクラス blocked_rangeクラスと同様にアルゴリズムやコンテナ走査に使用される
- simple_partitionerクラス 範囲を限界まで再帰的に細分化するようグレインサイズを設定する blocked_range/blocked_range2dクラスと共に使用される
- auto_partitionerクラス タスクスケジューラの挙動を元に最適なグレインサイズを設定する blocked_range/blocked_range2dクラスと共に使用される
- 同期プリミティブ
- パフォーマンス測定
- tick_countクラス 時間取得
脚注
- ^ “Releases · oneapi-src/oneTBB”. GitHub. 2025年2月2日閲覧。
- ^ a b oneTBB/SYSTEM_REQUIREMENTS.md at master · oneapi-src/oneTBB
- ^ oneapi-src/oneTBB at 4.4.6
- ^ oneapi-src/oneTBB at 2017
- ^ インテル® Parallel Studio XE 評価ガイド - インテル® TBB による効率良いスレッド化
- ^ Intel(R) Threading Building Blocks - Release Notes Version 2018
関連項目
外部リンク
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.