-1

I read here that Google has openly displayed its opposition to OpenCL, and another thread discusses why Google choose RenderScript instead of OpenCL. Both of these posts are old.

Does recent Android versions (N,O) include support for OpenCL ?

RonTLV
  • 2,376
  • 2
  • 24
  • 38

2 Answers2

1

The driver support does not only depend on the Android OS itself, but rather the hardware manufacturers. Arm for example has opencl driver support for android 6 and 7. I tried looking for snapdragon as well but could not find. It would be better if you checked the hardware manufacturers web pages for corresponding OpenCL drivers. Here are the links for Arm Mali:

ARM Mali GPU device drivers

Another thing is, the driver support for OpenCL is far better in Android OS than Linux since I am having a hard time finding OpenCL support for mobile devices running Linux.

parallel highway
  • 354
  • 2
  • 12
1

You can just dynamic link against:

  • /vendor/lib/egl/libGLES_mali.so (ARM devices)
  • /vendor/lib/libOpenCL.so (Qualcomm devices)

It will work perfectly. Even if Android does not have an API to support it, the hardware does, it will work just like OpenGL does.

DarkZeros
  • 8,235
  • 1
  • 26
  • 36
  • 1
    Can I do that in Android.mk ? I need to make a call to atan2 in a c file (jni). Example will be great ! – RonTLV Aug 29 '17 at 16:36