A Parallel Programming with Microsoft Visual C++: Design Patterns for Decomposition and Coordination on Multicore Architectures (Paperback)
暫譯: 使用 Microsoft Visual C++ 的平行程式設計:多核心架構的分解與協調設計模式 (平裝本)

Colin Campbell, Ade Miller

  • 出版商: MicroSoft
  • 出版日期: 2011-04-22
  • 售價: $1,360
  • 貴賓價: 9.5$1,292
  • 語言: 英文
  • 頁數: 208
  • 裝訂: Paperback
  • ISBN: 0735651752
  • ISBN-13: 9780735651753
  • 相關分類: C++ 程式語言Visual C++Design Pattern
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Your CPU meter shows a problem. One core is running at 100 percent, but all the other cores are idle. Your application is CPU-bound, but you are using only a fraction of the computing power of your multicore system. Is there a way to get better performance?

The answer, in a nutshell, is parallel programming. Where you once would have written the kind of sequential code that is familiar to all programmers, you now find that this no longer meets your performance goals. To use your system’s CPU resources efficiently, you need to split your application into pieces that can run at the same time. Of course, this is easier said than done. Parallel programming has a reputation for being the domain of experts and a minefield of subtle, hard-to-reproduce software defects. Everyone seems to have a favorite story about a parallel program that did not behave as expected because of a mysterious bug.

These stories should inspire a healthy respect for the difficulty of the problems you will face in writing your own parallel programs. Fortunately, help has arrived. The Parallel Patterns Library (PPL) and the Asynchronous Agents Library introduce a new programming model for parallelism that significantly simplifies the job. Behind the scenes are sophisticated algorithms that dynamically distribute computations on multicore architectures. In addition, Microsoft® Visual Studio® 2010 development system includes debugging and analysis tools to support the new parallel programming model.

Proven design patterns are another source of help. This guide introduces you to the most important and frequently used patterns of parallel programming and provides executable code samples for them, using PPL. When thinking about where to begin, a good place to start is to review the patterns in this book. See if your problem has any attributes that match the six patterns presented in the following chapters. If it does, delve more deeply into the relevant pattern or patterns and study the sample code.

商品描述(中文翻譯)

您的 CPU 計量器顯示出一個問題。一個核心運行在 100% 的負載,但其他所有核心都處於閒置狀態。您的應用程式是 CPU 綁定的,但您只使用了多核心系統的一小部分計算能力。有沒有辦法獲得更好的性能?

簡而言之,答案是平行程式設計。在過去,您可能會編寫所有程式設計師都熟悉的順序代碼,但現在您發現這已經無法滿足您的性能目標。為了有效利用系統的 CPU 資源,您需要將應用程式拆分成可以同時運行的部分。當然,這說起來容易,但做起來難。平行程式設計以專家的領域和充滿微妙、難以重現的軟體缺陷而聞名。似乎每個人都有一個關於平行程式的故事,因為神秘的錯誤而未能如預期運作。

這些故事應該能激發您對編寫自己平行程式所面臨的問題的敬畏。幸運的是,幫助已經來臨。平行模式庫(Parallel Patterns Library, PPL)和非同步代理庫(Asynchronous Agents Library)引入了一種新的平行性程式設計模型,顯著簡化了這項工作。在幕後,有複雜的演算法動態分配計算到多核心架構上。此外,Microsoft® Visual Studio® 2010 開發系統包括調試和分析工具,以支持新的平行程式設計模型。

經過驗證的設計模式是另一個幫助來源。本指南將介紹平行程式設計中最重要和最常用的模式,並提供使用 PPL 的可執行代碼範例。在考慮從何開始時,一個好的起點是回顧本書中的模式。看看您的問題是否具有與接下來幾章中介紹的六種模式相匹配的屬性。如果有,深入研究相關的模式並學習範例代碼。