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
90
iOS Tools
alienxp03
1
200
RxSwift+MVVM
alienxp03
1
500
From a student to a developer
alienxp03
1
110
Other Decks in Programming
See All in Programming
CSC307 Lecture 09
javiergs
PRO
1
830
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
AtCoder Conference 2025
shindannin
0
1k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
6k
dchart: charts from deck markup
ajstarks
3
990
CSC307 Lecture 06
javiergs
PRO
0
680
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
150
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
CSC307 Lecture 04
javiergs
PRO
0
660
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Embracing the Ebb and Flow
colly
88
5k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
The agentic SEO stack - context over prompts
schlessera
0
630
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
We Have a Design System, Now What?
morganepeng
54
8k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
79
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
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