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
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
90
iOS Tools
alienxp03
1
190
RxSwift+MVVM
alienxp03
1
500
From a student to a developer
alienxp03
1
110
Other Decks in Programming
See All in Programming
Pythonに漸進的に型をつける
nealle
1
130
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
220
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.2k
Cursorハンズオン実践!
eltociear
2
1.2k
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Towards Transactional Buffering of CDC Events @ Flink Forward 2025 Barcelona Spain
hpgrahsl
0
120
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
2
200
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
390
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
360
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
12
7.2k
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
Devvox Belgium - Agentic AI Patterns
kdubois
1
150
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
How STYLIGHT went responsive
nonsquared
100
5.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
130k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
The Invisible Side of Design
smashingmag
302
51k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Navigating Team Friction
lara
190
15k
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