Hello,
I want to use my OpenCL lib to process image on my moto Z. I get the so file of the library and now I would like to use it in my project in Android Studio.
I am not able to find a example of OpenCL process in Android Studio in c++.
Where could I get a sample example?
Edit: I looked at the adreno SDK for linux, I notice that there are no OpenCL headers folder and no example contrary to the sdk on Mac.
Why that difference?
I try to build a project from that page:
http://arrayfire.com/getting-started-with-opencl-on-android/
The compilation works with nkd10e but when I run on my moto Z I get that error:
2-22 10:00:41.077 7302 7302 D AndroidRuntime: Shutting down VM
02-22 10:00:41.078 7302 7302 E AndroidRuntime: FATAL EXCEPTION: main
02-22 10:00:41.078 7302 7302 E AndroidRuntime: Process: com.example.subsamplecamera, PID: 7302
02-22 10:00:41.078 7302 7302 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libGLES_mali.so" not found
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:977)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1530)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at com.example.subsamplecamera.MainActivity.<clinit>(MainActivity.java:30)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1100)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2551)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2724)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1473)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6123)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-22 10:00:41.078 7302 7302 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.ru
Why the program try to find the libGLES_mali.so?
I just try to use that page to link OpenCL:
http://arrayfire.com/getting-started-with-opencl-on-android/
But as soon as I link the libOpenCL.so on my project I get that:
But I don't have mali chipset, why my project try to call that?