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
140
0
Share
Metal Demo
alienxp03
September 14, 2015
More Decks by alienxp03
See All by alienxp03
Rails, Capistrano & AWS
alienxp03
0
98
iOS Tools
alienxp03
1
210
RxSwift+MVVM
alienxp03
1
510
From a student to a developer
alienxp03
1
110
Other Decks in Programming
See All in Programming
Moments When Things Go Wrong
aurimas
3
130
ふつうのFeature Flag実践入門
irof
7
3.4k
GitHub Copilot CLIのいいところ
htkym
2
1.2k
RTSPクライアントを自作してみた話
simotin13
0
380
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
980
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
0
190
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
180
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
400
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
230
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
310
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
500
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
4 Signs Your Business is Dying
shpigford
187
22k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
430
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Skip the Path - Find Your Career Trail
mkilby
1
130
Amusing Abliteration
ianozsvald
1
190
A Tale of Four Properties
chriscoyier
163
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
210
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