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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
alienxp03
September 14, 2015
Programming
130
0
Share
Metal Demo
alienxp03
September 14, 2015
More Decks by alienxp03
See All by alienxp03
Rails, Capistrano & AWS
alienxp03
0
94
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
when storing skills in S3 file
watany
3
1.4k
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.6k
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.6k
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.8k
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
200
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
140
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
110
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
Explore CoroutineScope
tomoeng11
0
170
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
190
AIと共に生きる技術選定 2026
sgash708
0
130
[RubyKaigi 2026] Require Hooks
palkan
1
300
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
370
Writing Fast Ruby
sferik
630
63k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
540
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The SEO identity crisis: Don't let AI make you average
varn
0
460
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
350
Amusing Abliteration
ianozsvald
1
160
The SEO Collaboration Effect
kristinabergwall1
1
440
Joys of Absence: A Defence of Solitary Play
codingconduct
1
360
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
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