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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
alienxp03
September 14, 2015
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Metal Demo
alienxp03
September 14, 2015
More Decks by alienxp03
See All by alienxp03
Rails, Capistrano & AWS
alienxp03
0
99
iOS Tools
alienxp03
1
210
RxSwift+MVVM
alienxp03
1
510
From a student to a developer
alienxp03
1
110
Other Decks in Programming
See All in Programming
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.3k
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
140
net-httpのHTTP/2対応について
naruse
0
500
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
160
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.7k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
880
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
290
Claspは野良GASの夢をみるか
takter00
0
200
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
250
Oxcを導入して開発体験が向上した話
yug1224
4
320
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
340
How to Ace a Technical Interview
jacobian
281
24k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
200
The Curse of the Amulet
leimatthew05
1
13k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
Practical Orchestrator
shlominoach
191
11k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Designing for humans not robots
tammielis
254
26k
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