Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Android support OpenCL?

Tags:

android

opencl

Recently I want to develop the parallel computing application on android use OpenCL. As far as I know, Android system does not include "libopencl.so",but there are still some webs or blogs show OpenCL development on android. Does Android support OpenCL? if so, what should I do to develop OpenCL on android ?

like image 524
liu jie Avatar asked Nov 07 '14 07:11

liu jie


3 Answers

Update on May 20, 2016

For all devices with arm64-v8a ABI, the OpenCL library may located in lib64 folder as well.

So when you check the OpenCL library, make sure you also check the corresponding lib64 folder (if you prefer arm64-v8a as the first ABI for your app, you may want to first check lib64 folder).

For example: /system/vendor/lib64/libOpenCL.so


The original answer:

Since 2014, there are more phones supporting OpenCL.

The followings are the location of the OpenCL library:

Qualcomm Adreno:

/system/vendor/lib/libOpenCL.so
or /system/lib/libOpenCL.so (older devices)

ARM Mali:

/system/vendor/lib/egl/libGLES_mali.so
or /system/lib/egl/libGLES_mali.so

PowerVR:

/system/vendor/lib/libPVROCL.so

You can use OpenCL-Z Android to check the available and capabilities of OpenCL on Android devices.

like image 161
Robert Wang Avatar answered Oct 20 '22 18:10

Robert Wang


Strictly speaking, Android does not support OpenCL. That is Google's (bad) choice. However, you can run OpenCL applications on your Android device if you can get hold of an OpenCL library for it. From the links Kirtan provides, I'd recommend the Sony route as it is the most straight forward (i.e. the phones already come with OpenCL on them) which I believe is Qualcomm's Adreno GPU.

The only Imagination OpenCL availability I know of is on this dev board. It has an SGX544 so you may be able to take the drivers from that board and put them on your device. It may work.....

As an aside: OpenGL ES 3.1 supports GL compute shaders and is supported on Android so may be an option of you are looking to ship something using the GPU for compute.

like image 4
user2746401 Avatar answered Oct 20 '22 16:10

user2746401


you can take reference of below links

https://software.intel.com/en-us/android/articles/opencl-basic-sample-for-android-os

http://arrayfire.com/getting-started-with-opencl-on-android/

http://developer.sonymobile.com/2013/10/29/boost-the-performance-of-your-android-app-with-opencl/

like image 3
Kirtan Avatar answered Oct 20 '22 18:10

Kirtan