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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
alienxp03
September 14, 2015
Programming
0
130
Metal Demo
alienxp03
September 14, 2015
Tweet
Share
More Decks by alienxp03
See All by alienxp03
Rails, Capistrano & AWS
alienxp03
0
92
iOS Tools
alienxp03
1
200
RxSwift+MVVM
alienxp03
1
510
From a student to a developer
alienxp03
1
110
Other Decks in Programming
See All in Programming
The free-lunch guide to idea circularity
hollycummins
0
370
ロボットのための工場に灯りは要らない
watany
12
3.2k
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
310
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
370
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
210
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
200
Understanding Apache Lucene - More than just full-text search
spinscale
0
140
ファインチューニングせずメインコンペを解く方法
pokutuna
0
200
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.6k
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
220
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
240
KagglerがMixSeekを触ってみた
morim
0
330
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
150
Thoughts on Productivity
jonyablonski
75
5.1k
Visualization
eitanlees
150
17k
How to Ace a Technical Interview
jacobian
281
24k
Navigating Weather and Climate Data
rabernat
0
150
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
97
Technical Leadership for Architectural Decision Making
baasie
3
300
Deep Space Network (abreviated)
tonyrice
0
97
Darren the Foodie - Storyboard
khoart
PRO
3
3k
Code Reviewing Like a Champion
maltzj
528
40k
Producing Creativity
orderedlist
PRO
348
40k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
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