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
89
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
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
420
為你自己學 Python - 冷知識篇
eddie
1
340
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
1k
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
0
350
Claude Codeで実装以外の開発フロー、どこまで自動化できるか?失敗と成功
ndadayo
4
1.9k
Design Foundational Data Engineering Observability
sucitw
3
160
フロントエンドのmonorepo化と責務分離のリアーキテクト
kajitack
2
160
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
400
testingを眺める
matumoto
1
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
260
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
7
1k
Featured
See All Featured
Speed Design
sergeychernyshev
32
1.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building Applications with DynamoDB
mza
96
6.6k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Practical Orchestrator
shlominoach
190
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
What's in a price? How to price your products and services
michaelherold
246
12k
How to Ace a Technical Interview
jacobian
279
23k
Into the Great Unknown - MozCon
thekraken
40
2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
KATA
mclloyd
32
14k
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