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
120
Metal Demo
alienxp03
September 14, 2015
Tweet
Share
More Decks by alienxp03
See All by alienxp03
Rails, Capistrano & AWS
alienxp03
0
80
iOS Tools
alienxp03
1
180
RxSwift+MVVM
alienxp03
1
500
From a student to a developer
alienxp03
1
100
Other Decks in Programming
See All in Programming
マルチアカウント環境での、そこまでがんばらない RI/SP 運用設計
wa6sn
0
710
custom_lintで始めるチームルール管理
akaboshinit
0
200
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
2.6k
AI Coding Agent Enablement - エージェントを自走させよう
yukukotani
13
5.8k
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
1
240
コンテナでLambdaをデプロイするときに知っておきたかったこと
_takahash
0
180
5年間継続して開発した自作OSSの記録
bebeji_nappa
0
170
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6.1k
生成AIを使ったQAアプリケーションの作成 - ハンズオン補足資料
oracle4engineer
PRO
3
200
Kubernetesで実現できるPlatform Engineering の現在地
nwiizo
3
1.9k
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
140
Being an ethical software engineer
xgouchet
PRO
0
210
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
A designer walks into a library…
pauljervisheath
205
24k
Statistics for Hackers
jakevdp
798
220k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
For a Future-Friendly Web
brad_frost
176
9.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Code Reviewing Like a Champion
maltzj
522
39k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
178
53k
RailsConf 2023
tenderlove
30
1.1k
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