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
92
iOS Tools
alienxp03
1
200
RxSwift+MVVM
alienxp03
1
510
From a student to a developer
alienxp03
1
110
Other Decks in Programming
See All in Programming
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.4k
飯MCP
yusukebe
0
370
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
110
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
120
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
160
CSC307 Lecture 15
javiergs
PRO
0
270
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
180
Nostalgia Meets Technology: Super Mario with TypeScript
manfredsteyer
PRO
0
110
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
370
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
270
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
GitHub's CSS Performance
jonrohan
1032
470k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
250
What's in a price? How to price your products and services
michaelherold
247
13k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
110
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
The Curse of the Amulet
leimatthew05
1
11k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
100
Ethics towards AI in product and experience design
skipperchong
2
240
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