Although time has passed since the original question was asked, I think this is still a question for a lot of developers.
There are two aspects in the answer.
First, unfortunately, Google doesn't support OpenCL officially.
Second, fortunately, many chip vendors provide their libraries to support OpenCL. As the time for now, most of the flagship and middle-tier smartphones (with Qualcomm Adreno GPU, ARM Mali GPU, or Imagination PowerVR GPU) include the OpenCL libraries.
To use OpenCL on Android, there are several steps:
- check if there is OpenCL library on the device. This can be done by using OpenCL-Z Android. This is a great tool to check the OpenCL availability on Android devices, and it also provides raw compute performance metrics, which could be very helpful.
The OpenCL libraries for the major chip vendors can be found in the devices:
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
Write your OpenCL program using C or C++
Create NDK project to compile your C/C++ code, and test them on the device as executable.
Create JNI interface for your NDK program functions.
Create Android project, using JNI functions in the JAVA code to call native functions involving with OpenCL.
The sony tutorial is a good source to refer. The techniques presented in that tutorial can be applied to any Qualcomm Adreno GPU. With very minimal modification, that code and makefiles can also run on other OpenCL-capable devices (such as Mali and PowerVR).
Hope this helps.