Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
654
|
第十六章
討論說明
ParallelTable
指令有許多好用的應用。例如,大量圖形最適合利用多核心電腦繪製,
而平行運算使得動畫製作更有效率。[Page-657]
ch16.indd 654 2014/4/2 下午 04:11:05
16.8 選擇適當的資料分散處理方法
|
655
多筆資料組也可平行化建立,以便進一步繪圖與運算。[Page-658]
16.8 選擇適當的資料分散處理方法
問題點
你的計算對不同輸入有很大的執行時間差異,但你想使用平行處理。[Page-659]
解決方案
Parallelize
ParallelMap
ParallelTable
ParallelDo
ParallelSum
ParallelCombine
均支援
Method
選項,可用來指定資料分割平行處理的
粗細度。
當執行時間對不同輸入而有很大差異時,建議設定
Method
"FinestGrained"
選項,
此選項可避免計算核心分配到過於龐大而耗時的運算量。為了說明這一點,以下使用
Pause
指令控制函數的計算時間,先以亂數建立許多小數目的計算時間,接著加入一個
大數目模擬耗時的計算。
ch16.indd 655 2014/4/2 下午 04:11:05
656
|
第十六章
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106