$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
190
RxSwift+MVVM
alienxp03
1
500
From a student to a developer
alienxp03
1
110
Other Decks in Programming
See All in Programming
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
4
520
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
130
sbt 2
xuwei_k
0
300
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
250
AIコーディングエージェント(NotebookLM)
kondai24
0
210
認証・認可の基本を学ぼう後編
kouyuume
0
240
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
0
130
Graviton と Nitro と私
maroon1st
0
110
AIエージェントの設計で注意するべきポイント6選
har1101
5
470
Go コードベースの構成と AI コンテキスト定義
andpad
0
130
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
750
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.9k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
GraphQLとの向き合い方2022年版
quramy
50
14k
How STYLIGHT went responsive
nonsquared
100
6k
Facilitating Awesome Meetings
lara
57
6.7k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Scaling GitHub
holman
464
140k
Raft: Consensus for Rubyists
vanstee
141
7.2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
26
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
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