Skip to Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner 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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mathematica Cookbook

Mathematica Cookbook

Sal Mangano
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9789863470106