Latest commit 3e98b42 Jan 15, 2015 @Ciechan Merge pull request #2 from endrelovas/patch-2
Xcode 6.1.1 compilation fixes
Failed to load latest commit information.
ExploringGPGPU.xcodeproj Added Project Jan 5, 2014
ExploringGPGPU Merge pull request #2 from endrelovas/patch-2 Jan 16, 2015
.gitignore Initial commit Jan 5, 2014
LICENSE Initial commit Jan 5, 2014
README.md Added Project Jan 5, 2014


Exploring GPGPU on iOS

This is a companion repo for my blog post on GPGPU computing on iOS. It contains three computation examples that were presented in the post as well as benchmarks used for performance measurements.

For the record, in the extreme case, the GPU performed over 64 times faster than CPU.


OpenGL ES 3.0 capable device

This basically boils down to A7 chip (iPhone 5s, iPad Air, Retina iPad mini).

iOS 7.1

While this code uses a new feature of OpenGL ES 3.0 (namely Transform Feedback) and the feature itself does work in iOS 7.0.x, it is somehow dysfunctional. Due to a confirmed bug (Apple dev account required), shaders that contain and call user defined functions do crash when used for Transform Feedback. While I could manually inline the function's body into the source code, my implementation generates shaders with variable number of in and out vectors and having a single function to call made shader generator significantly easier to create. While I've tested the code on iOS 7.1 beta 2, it should work on beta 1 as well.

Note, that if you are willing to write the shader manually or create a smarter shader generator that will not use user defined functions, you can make the code work on iOS 7.0.x.


This application doesn't display anything, it merely runs calculations on the CPU and the GPU then prints the benchmark output to the console.