Today's Tbb: C++ Parallel Programming with Threading Building Blocks
暫譯: 今日的 Tbb:使用 Threading Building Blocks 進行 C++ 平行程式設計
Voss, Michael J., Reinders, James R.
商品描述
This open-access book serves as a comprehensive guide for C++ programmers looking to master Threading Building Blocks (TBB). Authored by two experts in TBB and parallel programming, the book distills decades of collective experience in developing and teaching parallel programming concepts, presenting insights in a clear and accessible manner.
Today's TBB starts with foundational principles, explaining key concepts and terminology used in parallel programming. It then introduces the major components of TBB including parallel algorithms, flow graphs, and task groups that help you fully leverage the power of multicore systems. The book emphasizes TBB's higher-level parallelism capabilities, which facilitate the creation of portable, scalable applications for modern CPUs. Key topics, including memory management in parallel contexts and effective synchronization for data structures, are well explored, ensuring a comprehensive understanding of these critical concepts.
Later chapters delve into advanced topics including cancellation, exception handling, composability, performance tuning, and transitioning legacy code from older versions of TBB to Today's TBB.
For nearly two decades, TBB has been invaluable to programmers, and this book leverages the latest advancements in C++ alongside TBB to enhance your parallel programming capabilities.
TBB excels in unlocking the performance of code that is not well-suited for accelerators, making it an essential tool in the realm of parallel computing. If you work with technologies like CUDA, SYCL, or OpenCL for accelerated computing, mastering TBB will also enable you to orchestrate parallelism effectively on the host CPU, optimizing performance in the face of Amdahl's Law.
What You'll Learn
- Create Scalable Code: Use TBB for portable, simple, and efficient programming.
- Parallelization Strategies: Implement best practices for intensive tasks.
- High-Performance Applications: Develop scalable parallel programs.
- Modern C++ Compatibility: Apply TBB with C++17 and later.
- Code Migration: Update legacy TBB code to leverage C++17 and Today's TBB.
- Think Parallel: Orchestrate parallelism in the entire computer system to your advantage.
Who This Book Is For
C++ programmers eager to harness the power of parallelism on multicore systems. Today's TBB is accessible to those with limited experience, with C++ or parallelism, providing clear guidance on best practices and techniques. Experienced programmers will find valuable insights for refining their skills, addressing advanced topics such as cancellation, exception handling, composability, and performance tuning. No prior experience in parallel programming or multicore processors is necessary; however, those with some background will discover even more depth and value throughout the book.
商品描述(中文翻譯)
這本開放存取的書籍是 C++ 程式設計師掌握 Threading Building Blocks (TBB) 的全面指南。由兩位 TBB 和平行程式設計的專家撰寫,這本書提煉了數十年的集體經驗,專注於開發和教學平行程式設計概念,以清晰易懂的方式呈現見解。
《今日的 TBB》從基礎原則開始,解釋平行程式設計中使用的關鍵概念和術語。接著介紹 TBB 的主要組件,包括平行演算法、流程圖和任務群組,幫助您充分利用多核心系統的力量。這本書強調 TBB 的高階平行性能力,促進為現代 CPU 創建可攜帶、可擴展的應用程式。關鍵主題,包括平行環境中的記憶體管理和數據結構的有效同步,都得到了充分探討,確保對這些關鍵概念的全面理解。
後面的章節深入探討高級主題,包括取消、例外處理、可組合性、性能調整,以及將舊版 TBB 的遺留代碼轉換為《今日的 TBB》。
近二十年來,TBB 對程式設計師來說是不可或缺的,這本書利用 C++ 的最新進展與 TBB 結合,增強您的平行程式設計能力。
TBB 在釋放不適合加速器的代碼性能方面表現出色,使其成為平行計算領域中的重要工具。如果您使用 CUDA、SYCL 或 OpenCL 等技術進行加速計算,掌握 TBB 也將使您能夠有效地在主 CPU 上協調平行性,優化在 Amdahl 法則下的性能。
您將學到的內容:
- 創建可擴展的代碼:使用 TBB 進行可攜帶、簡單且高效的程式設計。
- 平行化策略:為密集任務實施最佳實踐。
- 高性能應用程式:開發可擴展的平行程式。
- 現代 C++ 相容性:將 TBB 應用於 C++17 及以後版本。
- 代碼遷移:更新舊版 TBB 代碼以利用 C++17 和《今日的 TBB》。
- 平行思考:在整個計算機系統中協調平行性以獲得優勢。
本書適合對象:
渴望在多核心系統上利用平行性力量的 C++ 程式設計師。《今日的 TBB》對於有限經驗的讀者(無論是 C++ 還是平行性)都很友好,提供最佳實踐和技術的清晰指導。經驗豐富的程式設計師將發現有價值的見解,以提升他們的技能,並探討高級主題,如取消、例外處理、可組合性和性能調整。無需具備平行程式設計或多核心處理器的先前經驗;然而,具備一些背景知識的讀者將在整本書中發現更深層次的內容和價值。
作者簡介
作者簡介(中文翻譯)
邁克爾·沃斯(Michael Voss)是英特爾(Intel)中介軟體架構的高級首席工程師。他自2006年TBB 1.0版本發布之前就已成為TBB開發團隊的關鍵成員。邁克爾共同撰寫了超過40篇關於平行程式設計的已發表論文和文章,並經常與來自不同領域的客戶進行諮詢,幫助他們有效地在應用程式中利用平行性。他是ISO C++委員會(WG21)的成員,參與有關函式庫和併發性的討論。在2006年加入英特爾之前,邁克爾曾擔任多倫多大學(University of Toronto)電機與計算機工程系的助理教授。他在普渡大學(Purdue University)電機與計算機工程學院獲得博士學位。
詹姆斯·瑞德斯(James Reinders)在英特爾公司(Intel Corporation)享有超過四十年的卓越職業生涯。詹姆斯在平行計算方面擁有豐富的經驗,撰寫、共同撰寫或編輯了十二本關於平行程式設計的技術書籍,並對其他許多書籍做出了貢獻。作為密西根大學(University of Michigan)工程學程的自豪畢業生,他對系統優化和教學充滿熱情。詹姆斯有幸參與了兩台世界上最快的電腦,這兩台電腦均在TOP500名單上獲得第一名,以及許多其他超級電腦和軟體開發工具。隨著本書的完成,詹姆斯已從英特爾退休,現在在俄勒岡州享受應得的悠閒生活。