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
86
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
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
570
Goで作る、開発・CI環境
sin392
0
190
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
1.2k
技術同人誌をMCP Serverにしてみた
74th
1
580
CursorはMCPを使った方が良いぞ
taigakono
1
220
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
350
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
180
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.9k
童醫院敏捷轉型的實踐經驗
cclai999
0
210
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
270
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
250
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
470
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1031
460k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Writing Fast Ruby
sferik
628
62k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Site-Speed That Sticks
csswizardry
10
680
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Fireside Chat
paigeccino
37
3.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
500
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