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
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
感情を設計する
ichimichi
5
1.5k
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
240
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
210
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
22
12k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
100
おれのAgentic Coding 2026/03
tsukasagr
1
150
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
330
Make GenAI Production-Ready with Kubernetes Patterns
bibryam
0
120
Coding as Prompting Since 2025
ragingwind
0
830
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
260
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
910
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
920
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
270
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
220
Writing Fast Ruby
sferik
630
63k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
510
Bash Introduction
62gerente
615
210k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
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