並行最佳化、xvout

來源:互聯網
上載者:User
編程最佳化:
1. 編程最佳化,比如Fortran二維數組中,要按行存放,按列訪問,這樣可以讓cache工作更高效。
2. 迴圈展開,如CPU一拍能做四次浮點運算,那麼可以將一個浮點計算迴圈(計算內容簡單的)拆分成每次迴圈step為4,迴圈體內手動做四次迴圈代碼。這樣代碼不好看,但是能得到效能提高。
3. 運算順序的調整,減少CPU流水線的遲滯。可以和迴圈展開配合,得到更好的效能。
3. 針對Cache的最佳化。
    數組合并: 利用塊長,改善空間局部性
    迴圈交換: 改變嵌套迴圈中訪問記憶體的次序
    迴圈合并: 增強資料的可重用性(時間局部性)
    分塊: 集中訪問可取入cache的塊狀矩陣,避免全行或全列的讀寫,以增強時間局部性。-- 計算一個Cache中能放下的子矩陣。
4. 做MPI通訊的時候,將小資料量多次通訊變成整合式少次通訊。這樣迴避網路latency的問題。
5. 檔案I/O要盡量減少,除非是不能迴避的。
6. 考慮OpenMP+MPI的並行編碼方式,這樣在單機內可以避免使用MPI。

編譯等其他輔助性最佳化:
1. Intel compiler - 針對硬體架構的最佳化,比如MMX/SSE等指令集的最佳化。可以最佳化一些looper等。Prefetch, loop interchange, cache blocking等。
2. 使用高效的數學庫(BLAS/GOTO等)。
3. 利用vtunes等類似效能調試軟體來調試效能熱點。比如vtunes/Intel cluster toolkits可以看出計算/通訊的時間佔用比。

xvout:
The X video extension, often abbreviated as XVideo or Xv, is a video output mechanism for the X Window System. The protocol was designed by David Carver; the specification for version 2 of the protocol was written in July 1991.[1] Its main use today is to rescale video playback in the video controller hardware, in order to enlarge a given video or to watch it in full screen mode. Without XVideo, X would have to do this scaling on the main CPU. That requires a considerable amount of processing power, sometimes to the point of slowing down/degrading the video stream; the video controller is specifically designed for this kind of computation, so can do it much more cheaply. Similarly, the X video extension has the video controller perform color space conversions. It can also have the controller change contrast, brightness and hue of a displayed video stream.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.