28

With the push towards multimedia enabled mobile devices this seems like a logical way to boost performance on these platforms, while keeping general purpose software power efficient. I've been interested in the IPad hardware as a developement platform for UI and data display / entry usage. But am curious of how much processing capability the device itself is capable of. OpenCL would make it a JUICY hardware platform to develop on, even though the licensing seems like it kinda stinks.

NoMoreZealots
  • 5,274
  • 7
  • 39
  • 56

5 Answers5

21

OpenCL is not yet part of iOS.

However, the newer iPhones, iPod touches, and the iPad all have GPUs that support OpenGL ES 2.0. 2.0 lets you create your own programmable shaders to run on the GPU, which would let you do high-performance parallel calculations. While not as elegant as OpenCL, you might be able to solve many of the same problems.

Additionally, iOS 4.0 brought with it the Accelerate framework which gives you access to many common vector-based operations for high-performance computing on the CPU. See Session 202 - The Accelerate framework for iPhone OS in the WWDC 2010 videos for more on this.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
  • Is there an update on the status of OpenCL in future iOS releases? Ive seen posts like this dating back to 2008 and we are trying to decide whether to build a vision framework in OpenCL because we want to be able to run it on iPhone and Android. So, any news? – twerdster May 04 '11 at 15:49
  • 1
    @twerdster - As with anything from Apple, it's anybody's guess as to what the future will bring. Wait until June 6 to find out what's coming in the next year. Honestly, I'd start implementing your vision processing system using generic OpenGL ES 2.0 shaders, rather than wait for OpenCL on both iOS and Android. – Brad Larson May 04 '11 at 17:52
  • Thanks for your input. Unfortunately OpenGL ES 2.0 isnt supported on Android yet. But I suppose it will take us 6 months and we can build on iOS in the mean time so maybe things will be available then. – twerdster May 04 '11 at 21:46
  • 3
    @twerdster - I'm not an Android developer, but Android has had OpenGL ES 2.0 support for over a year now: http://android-developers.blogspot.com/2010/03/android-ndk-r3.html . Not all hardware may have powerful enough GPUs to use it, but I'd say most devices out there should. – Brad Larson May 04 '11 at 22:02
7

Caution! This question is ranked as 2nd result by google. However most answers here (including mine) are out-of-date. People interested in OpenCL on iOS should visit more update-to-date entries like this -- https://stackoverflow.com/a/18847804/443016.


http://www.macrumors.com/2011/01/14/ios-4-3-beta-hints-at-opencl-capable-sgx543-gpu-in-future-devices/

iPad2's GPU, PowerVR SGX543 is capable of OpenCL.

Let's wait and see which iOS release will bring OpenCL APIs to us.:)

Community
  • 1
  • 1
Tim Wu
  • 2,047
  • 2
  • 22
  • 32
6

Following from nacho4d:

There is indeed an OpenCL.framework in iOS5s private frameworks directory, so I would suppose iOS6 is the one to watch for OpenCL.

Actually, I've seen it in OpenGL-related crash logs for my iPad 1, although that could just be CPU (implementing parts of the graphics stack perhaps, like on OSX).

KarlWa
  • 61
  • 1
  • 1
  • Where is it? I don't see it [here](https://github.com/mattlawer/iOS5-Private-Frameworks). – LaC Nov 16 '11 at 17:38
  • @LaC So far only visible in crash logs, such as http://stackoverflow.com/questions/7976805/application-not-running-in-ios-5 and http://freeetime.com/forum/threads/24320-OpenCL-in-iOS5 – Adam Davis Dec 06 '11 at 05:17
  • Sadly, still private in iOS6. – Kaolin Fire Feb 08 '13 at 20:15
3

You can compile and run OpenCL code on iOS using the private OpenCL framework, but you probably don't get a project into the App Store (Apple doesn't want you to use private frameworks).

Here is how to do it: https://github.com/linusyang/opencl-test-ios

Erwin Coumans
  • 1,766
  • 14
  • 22
1

OpenCL ? No yet. A good way of guessing next Public Frameworks in iOSs is by looking at Private Frameworks Directory. If you see there what you are looking for, then there are chances. If not, then wait for the next release and look again in the Private stuff. I guess CoreImage is coming first because OpenCL is too low level ;) Anyway, this is just a guess

nacho4d
  • 43,720
  • 45
  • 157
  • 240