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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Metal Demo
alienxp03
September 14, 2015
More Decks by alienxp03
See All by alienxp03
Rails, Capistrano & AWS
alienxp03
0
99
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
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
8
3.9k
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
190
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
480
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
210
symfony/aiとlaravel/boost
77web
0
120
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
スマートグラスで並列バイブコーディング
hyshu
0
290
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
Amusing Abliteration
ianozsvald
1
220
RailsConf 2023
tenderlove
30
1.5k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
490
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
Designing Experiences People Love
moore
143
24k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
460
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
150
Designing Powerful Visuals for Engaging Learning
tmiket
1
450
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