Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Metal Demo
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
alienxp03
September 14, 2015
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Metal Demo
alienxp03
September 14, 2015
More Decks by alienxp03
See All by alienxp03
Rails, Capistrano & AWS
alienxp03
0
100
iOS Tools
alienxp03
1
210
RxSwift+MVVM
alienxp03
1
510
From a student to a developer
alienxp03
1
120
Other Decks in Programming
See All in Programming
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
450
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
140
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
570
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.5k
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
750
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
580
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
170
メールのエイリアス機能を履き違えない
isshinfunada
0
220
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
480
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
210
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
230
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
GraphQLとの向き合い方2022年版
quramy
50
15k
Rails Girls Zürich Keynote
gr2m
96
14k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
A Tale of Four Properties
chriscoyier
163
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
330
Transcript
GPU Programming in Metal • Twitter: @alienxp03 • Not a
GPU programmer
Metal • Introduced in iOS 8 • Only for iOS
devices • Usage - Graphic rendering - Parallel data computation
Basic guide • Initialise Metal
Basic guide • Call the compiled shader function
Basic guide • Set parameters
Basic guide • Threadgroups
Basic guide • Run the computation • Get the result
Shader language • Using C++11 with some extension and limitation
pow(x, y) • 12,228 integers - CPU : 0.028833416668931 secs
- GPU : 0.0302730000112206 secs
pow(x, y) • 33,554,432 integers (2 ^ 25 ) -
CPU : 73.7681545416708 secs - GPU : 38.1098593333445 secs
Implementation • Didn’t compare precise::pow vs fast::pow • Initialise the
array on CPU, then pass it to GPU for computation • Using CPU cache memory
None
iOS 9 • Metal is now available on OS X
too • MTLResourceOptions
iOS 9 • Instrument, Metal System Trace
None
Lesson learned • We have GPU too, and it’s pretty
powerful • And it’s idle almost the whole time
Real world application • For data simulation or visualisation •
Though the truth is, I have no idea • Just did it for fun
GPU Programming in Metal • Twitter: @alienxp03 • Not a
GPU programmer