Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Metal Demo

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for alienxp03 alienxp03
September 14, 2015

Metal Demo

Avatar for alienxp03

alienxp03

September 14, 2015
Tweet

More Decks by alienxp03

Other Decks in Programming

Transcript

  1. Metal • Introduced in iOS 8 • Only for iOS

    devices • Usage - Graphic rendering - Parallel data computation
  2. pow(x, y) • 33,554,432 integers (2 ^ 25 ) -

    CPU : 73.7681545416708 secs - GPU : 38.1098593333445 secs
  3. 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
  4. iOS 9 • Metal is now available on OS X

    too • MTLResourceOptions
  5. Lesson learned • We have GPU too, and it’s pretty

    powerful • And it’s idle almost the whole time
  6. Real world application • For data simulation or visualisation •

    Though the truth is, I have no idea • Just did it for fun