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
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
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
820
組織で育むオブザーバビリティ
ryota_hnk
0
150
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
390
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
660
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
200
Implementation Patterns
denyspoltorak
0
270
Basic Architectures
denyspoltorak
0
630
ゆくKotlin くるRust
exoego
1
210
Data-Centric Kaggle
isax1015
2
710
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
550
Architectural Extensions
denyspoltorak
0
250
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
180
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
So, you think you're a good person
axbom
PRO
2
1.9k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
280
Between Models and Reality
mayunak
1
170
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Mind Mapping
helmedeiros
PRO
0
55
AI: The stuff that nobody shows you
jnunemaker
PRO
2
210
Building the Perfect Custom Keyboard
takai
2
670
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
86
Into the Great Unknown - MozCon
thekraken
40
2.2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
810
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
82
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