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
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
150
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
230
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
240
AI & Enginnering
codelynx
0
140
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
350
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
150
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
220
CSC307 Lecture 09
javiergs
PRO
1
850
株式会社 Sun terras カンパニーデック
sunterras
0
1.8k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
CSC307 Lecture 06
javiergs
PRO
0
700
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
PRO
0
190
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Design in an AI World
tapps
0
150
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
180
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
250
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
820
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.4k
The Invisible Side of Design
smashingmag
302
51k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
320
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