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
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
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
100
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
140
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
360
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
130
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
490
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
920
飯MCP
yusukebe
0
510
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
240
Swift Concurrency Type System
inamiy
0
520
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
760
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
0
140
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
130
My Coaching Mixtape
mlcsv
0
98
What's in a price? How to price your products and services
michaelherold
247
13k
Statistics for Hackers
jakevdp
799
230k
Paper Plane (Part 1)
katiecoart
PRO
0
6.6k
Why Our Code Smells
bkeepers
PRO
340
58k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
180
Visualization
eitanlees
150
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Exploring anti-patterns in Rails
aemeredith
3
320
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
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