$30 off During Our Annual Pro Sale. View Details »
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
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
認証・認可の基本を学ぼう後編
kouyuume
0
250
JETLS.jl ─ A New Language Server for Julia
abap34
2
440
tparseでgo testの出力を見やすくする
utgwkk
2
260
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
140
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
1.5k
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
460
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
250
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
270
愛される翻訳の秘訣
kishikawakatsumi
3
340
AIコーディングエージェント(Gemini)
kondai24
0
260
クラウドに依存しないS3を使った開発術
simesaba80
0
150
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Color Theory Basics | Prateek | Gurzu
gurzu
0
150
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
240
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Evolving SEO for Evolving Search Engines
ryanjones
0
73
Building AI with AI
inesmontani
PRO
1
570
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
90
RailsConf 2023
tenderlove
30
1.3k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Typedesign – Prime Four
hannesfritz
42
2.9k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
390
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