Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Metal Demo
Search
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
100
iOS Tools
alienxp03
1
210
RxSwift+MVVM
alienxp03
1
510
From a student to a developer
alienxp03
1
120
Other Decks in Programming
See All in Programming
Jetpack Compose メカニズム
skydoves
0
480
Security issues being discussed on Web Platforms
petamoriken
0
1.2k
AHC070解法紹介
eijirou
0
140
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
250
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
210
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
200
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
360
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
6
4.8k
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
260
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
160
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
260
The Rails Doctrine Decade
koic
2
390
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
700
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
280
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
We Are The Robots
honzajavorek
0
380
Color Theory Basics | Prateek | Gurzu
gurzu
1
470
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
Technical Leadership for Architectural Decision Making
baasie
3
580
Skip the Path - Find Your Career Trail
mkilby
1
240
Abbi's Birthday
coloredviolet
4
10k
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