$30 off During Our Annual Pro Sale. View Details »
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
connect-python: convenient protobuf RPC for Python
anuraaga
0
380
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
230
AIコーディングエージェント(Manus)
kondai24
0
160
AWS CDKの推しポイントN選
akihisaikeda
1
240
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
1
960
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
120
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
1k
ゲームの物理 剛体編
fadis
0
320
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.5k
開発に寄りそう自動テストの実現
goyoki
1
760
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
200
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
380
Featured
See All Featured
KATA
mclloyd
PRO
32
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Optimizing for Happiness
mojombo
379
70k
Unsuck your backbone
ammeep
671
58k
Mobile First: as difficult as doing things right
swwweet
225
10k
Raft: Consensus for Rubyists
vanstee
141
7.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Fireside Chat
paigeccino
41
3.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
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